SetPlayerCheckpoint FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 04:08, 5 January 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 17:59, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
+ | {{ScriptingFR}} | ||
+ | |||
+ | {{Description|Crée un checkpoint (cercle rouge) pour un joueur. Affiche aussi un carré rouge sur la carte.}} | ||
+ | |||
+ | {{ParametersFR|playerid, Float:x, Float:y, Float:z, Float:size}} | ||
+ | {{Param|playerid|L'ID du joueur à qui on va créer un checkpoint.}} | ||
+ | {{Param|Float:x|La position X où créer le checkpoint.}} | ||
+ | {{Param|Float:y|La position Y où créer le checkpoint.}} | ||
+ | {{Param|Float:z|La position Z où créer le checkpoint.}} | ||
+ | {{Param|Float:size|La taille du checkpoint.}} | ||
+ | |||
+ | {{NoReturnFR}} | ||
+ | |||
+ | {{note2FR|Le joueur ne peut (a)voir qu'un seul checkpoint à la fois.}} | ||
+ | |||
+ | |||
+ | {{note|1=Si vous voulez pouvoir récupérer la positon d'un checkpoint, vous pouvez utiliser cette include: http://forum.sa-mp.com/showthread.php?t=251483}} | ||
+ | |||
+ | <pawn> | ||
+ | // In this example the player's checkpoint will be set when they spawn. | ||
+ | // On entering the checkpoint they will receive $1000 and the checkpoint will be disabled. | ||
+ | |||
+ | public OnPlayerSpawn(playerid) | ||
+ | { | ||
+ | SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0); | ||
+ | return 1; | ||
+ | } | ||
+ | |||
+ | public OnPlayerEnterCheckpoint(playerid) | ||
+ | { | ||
+ | GivePlayerMoney(playerid, 1000); | ||
+ | DisablePlayerCheckpoint(playerid); | ||
+ | return 1; | ||
+ | } | ||
+ | </pawn> | ||
+ | |||
+ | {{RelatedFunctionsCallbackFR}} | ||
+ | {{DisablePlayerCheckpoint_FR}} | ||
+ | {{IsPlayerInCheckpoint_FR}} | ||
+ | {{SetPlayerRaceCheckpoint_FR}} | ||
+ | {{DisablePlayerRaceCheckpoint_FR}} | ||
+ | {{IsPlayerInRaceCheckpoint_FR}} | ||
+ | |||
+ | {{RelatedCallbacksFR}} | ||
+ | {{OnPlayerEnterCheckpoint_FR}} | ||
+ | {{OnPlayerLeaveCheckpoint_FR}} | ||
+ | {{OnPlayerEnterRaceCheckpoint_FR}} | ||
+ | {{OnPlayerLeaveRaceCheckpoint_FR}} | ||
+ | |||
[[Category:Scripting Functions FR]] | [[Category:Scripting Functions FR]] | ||
+ | |||
+ | [[fr:SetPlayerCheckpoint]] | ||
+ | [[ru:SetPlayerCheckpoint]] |
Revision as of 17:59, 5 February 2014
Page d'Accueil | Les Fonctions | Les Callbacks | Les bases du Scripting | Plugins de Serveur | Tutoriaux
Ne prenez pas en compte les FR dans les noms
Description:
Crée un checkpoint (cercle rouge) pour un joueur. Affiche aussi un carré rouge sur la carte.
(playerid, Float:x, Float:y, Float:z, Float:size)
playerid | L'ID du joueur à qui on va créer un checkpoint. |
Float:x | La position X où créer le checkpoint. |
Float:y | La position Y où créer le checkpoint. |
Float:z | La position Z où créer le checkpoint. |
Float:size | La taille du checkpoint. |
Retourne | Cette fonction ne retourne pas de valeur spécifique. |
Note | Si vous voulez pouvoir récupérer la positon d'un checkpoint, vous pouvez utiliser cette include: http://forum.sa-mp.com/showthread.php?t=251483 |
// In this example the player's checkpoint will be set when they spawn. // On entering the checkpoint they will receive $1000 and the checkpoint will be disabled. public OnPlayerSpawn(playerid) { SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0); return 1; } public OnPlayerEnterCheckpoint(playerid) { GivePlayerMoney(playerid, 1000); DisablePlayerCheckpoint(playerid); return 1; }
Fonctions relatives
Les fonctions suivantes peuvent êtres utiles car elles concernent indirectement ou non cette callback.
- DisablePlayerCheckpoint: Désactive(rend invisible et inutilisable) le checkpoint courant d'un joueur.
- IsPlayerInCheckpoint: Vérifie si le joueur est dans un checkpoint.
- SetPlayerRaceCheckpoint: Crée un checkpoint de course pour un joueur.
- DisablePlayerRaceCheckpoint: Désactive le checkpoint courant d'un joueur.
- IsPlayerInRaceCheckpoint: Vérifie si un joueur est dans un checkpoint de course.
Callback Relatives
Les Callbacks ci dessous sont indirectement ou directement liées à cette Callback.
- OnPlayerEnterCheckpoint: Appelée lorsqu'un joueur entre dans un checkpoint.
- OnPlayerLeaveCheckpoint: Appelée lorsqu'un joueur sort d'un checkpoint.
- OnPlayerEnterRaceCheckpoint: Appelée lorsqu'un joueur entre dans un checkpoint de course.
- OnPlayerLeaveRaceCheckpoint: Appelée lorsqu'un joueur sort d'un checkpoint de course.