GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Nikko™ le 29 Janvier 2008, 18:21:13

Titre: CheckPoint
Posté par: Nikko™ le 29 Janvier 2008, 18:21:13
Bonjour a tous,
Voila je vous explique mon probleme:
Jai créé un checkpoint de teleportation (qui marche très bien) mais le probleme c'est qu'il apparait en permanence sur la carte...
Je sais qu'il est possible de le faire disparaitre a partir d'une certaine distance (ex dans un fuel script) Mais je ne sais pas comment faire.
Si quelqu un peut m'aider  ::).

++
nikko
Titre: Re : CheckPoint
Posté par: R@f le 29 Janvier 2008, 18:33:31
Utilise un Checkpoint Streamer, c'est la solution la plus simple
en voici 2 :
http://forum.sa-mp.com/index.php?topic=35977.0
http://forum.sa-mp.com/index.php?topic=40383.0

++
R@f
Titre: Re : CheckPoint
Posté par: Nikko™ le 29 Janvier 2008, 19:40:47
Euh.... Merci mais tu peu m'expliquer comment ca fonctionne et comment l'installer pcq .... chui po tres fort en anglais  ::)
Merci

++
nikko
Titre: Re : CheckPoint
Posté par: R@f le 29 Janvier 2008, 20:03:52
normalement je dirai "Go google !" mais aujourd'hui je suis en bonne humeur donc je vais t'expliquer (ou traduire)
Donc moi je te conseille de prendre LCS 1.1, il est sortit il y'a pas longtemps et l'auteur (Luxury) est fiable
Donc tout d'abord tu le télécharges
Une fois que c'est fait tu le mets le fichier dans ton dossier Pawno->Includes
Après tu mets #include <LCS> en haut de ton script
Et ne surtout pas oublier de mettre LCS_Load(); dans OnGameModeInit
Donc ça c'était pour l'installation, maintenant on créé un checkpoint :)
tu utilises tout simplement : LCS_CreateCheckpoint(Float:x,Float:y,Float:z,Float:size);
Après tu peux encore voir les autres fonctions :
LCS_SetPlayerStaticCheck(playerid,checkpointid);
LCS_RemovePlayerStaticCheck(playerid);
LCS_GetPlayerStaticCheck(playerid);
LCS_CreateCheckpoint(Float:x,Float:y,Float:z,Float:size);
LCS_IsValidCheckpoint(checkpointid);
LCS_DestroyCheckpoint(checkpointid);
LCS_GetCheckpointData(checkpointid,&Float:x,&Float:y,&Float:z,&Float:size);
LCS_GetClosestCheckpoint(playerid);
LCS_IsPlayerInCheckpoint(playerid,checkpointid);
LCS_SetCheckpointData(checkpointid,Float:x,Float:y,Float:z,Float:size);
LCS_GetPlayerCheckpointIn(playerid);
LCS_IsPlayerInAnyCheckpoint(playerid);
LCS_IsAnyPlayerInCheckpoint(checkpointid);

Et les callbacks :
LCS_OnPlayerEnterCheckpoint(playerid,checkpointid);
LCS_OnPlayerLeaveCheckpoint(playerid,checkpointid);

Je n'ai jamais utilisé cet include mais en reflechissant un peu tu devrais comprendre ;)

++
R@f
Titre: Re : CheckPoint
Posté par: Nikko™ le 29 Janvier 2008, 20:59:50
J'ai a peu près compris mais pour le faire disparaitre a partir d'une certaine distance... on doit utiliser quoi et comment ???  :-[
Merci

++
nikko