GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Dark4ng3L le 19 Décembre 2009, 11:04:37
-
hello !
je développe ma première INC que je voudrais partagé sur GTAOnline.
Cette INC a pour but de généré des téléportations (par ex: pour entrer/sortir du commi SF),
voila la fonction :
CreateTelepPickup(ID_DU_PICKUP, TEXT_DU_PICKUP, TEXT_DRAW_QUAND_ON_ENTRE, TEXT_DRAW_QUAND_ON_SORT, INT_PICKUP, INT_SORTIE, Float:PICKUP_X, Float:PICKUP_Y, Float:PICKUP_Z, Float:SORTIE_X, Float:SORTIE_Y, Float:SORTIE_Z);
pour le moment, le pickup se crée avec le 3dText au dessus, mais quand on vas dessus, ca ne nous téléporte pas...
donc j'ai crée un petit débug en insérant print("DEBUG INC TELEPORT"); ce qui s'exécutait normalement...
Donc je ne trouve pas le bug (même avec Sim X:)
voici le lien de mon INC : http://pastebin.com/m416c3588
En espérant avoir été clair dans l'explication de mon problème,
++ D4 ++
-
TextDrawn != GameText est pourquoi utiliser IsPlayerInRangeOfPoint alors que c'est un pickup ??? je ne voit pas l'utiliter .
A mon avis regarde ton code avec notepad++ range le correctement car la c'est le fouillit complet et tu trouveras la boulette
-
J'utilise notpad ++ --'
pour ce qui es du rangeofpoint c'est car a la sortie il ne doit pas avoir de pickup...
-
if(IsPlayerInRangeOfPoint(i, 3, Pickup[p][Enter_X], Pickup[p][Enter_X], Pickup[p][Enter_Z]))
c'est la sortit sa ???
j'ai peur la :s
-
if(IsPlayerInRangeOfPoint(i, 3, Pickup[p][Enter_X], Pickup[p][Enter_X], Pickup[p][Enter_Z]))
lui il TP a la sortie
else if(IsPlayerInRangeOfPoint(i, 3, Pickup[p][Exit_X], Pickup[p][Exit_X], Pickup[p][Exit_Z]))
lui il TP a l'entrée
-
j'ai pas le temps de tester mais la deja j'ai un doute
stock CreateTelepPickup(ID, text[], Texte_entree[], Texte_sortie[], INT_En, INT_Ex, Float:er_X, Float:er_Y, Float:er_Z, Float:it_X, Float:it_Y, Float:it_Z)
{
IDPICKUP += 1;
strcpy(Pickup[IDPICKUP][Nom_Enter], Texte_entree);
strcpy(Pickup[IDPICKUP][Nom_Exit], Texte_sortie);
Pickup[IDPICKUP][INT_Enter] = INT_En;
Pickup[IDPICKUP][INT_Exit] = INT_Ex;
Pickup[IDPICKUP][Enter_X] = er_X;
Pickup[IDPICKUP][Enter_Y] = er_Y;
Pickup[IDPICKUP][Enter_Z] = er_Z;
Pickup[IDPICKUP][Exit_X] = it_X;
Pickup[IDPICKUP][Exit_Y] = it_Y;
Pickup[IDPICKUP][Exit_Z] = it_Z;
AddStaticPickup(ID, 2, er_X, er_Y, er_Z);
Create3DTextLabel(text ,0xB40100FF,er_X, er_Y, er_Z+1,10,0);
return 1;
}
le mieux base toi sur le fs gl_property
-
ca m'aide pas trop x:
-
Salut,
comme je t'ai dit sur msn,
tu serais mieux de procéder avec la callack OnPlayerPickUpPickup
pour la sortie tu peut toujours créer un nouveau pickup, sinon bah utilise un checkpoint (et OnPlayerEnterCheckpoint)
++Sim++