SetPlayerCheckpoint FR

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
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



Description:

Crée un checkpoint (cercle rouge) pour un joueur. Affiche aussi un carré rouge sur la carte.


Paramètres:
(playerid, Float:x, Float:y, Float:z, Float:size)
playeridL'ID du joueur à qui on va créer un checkpoint.
Float:xLa position X où créer le checkpoint.
Float:yLa position Y où créer le checkpoint.
Float:zLa position Z où créer le checkpoint.
Float:sizeLa taille du checkpoint.


RetourneCette fonction ne retourne pas de valeur spécifique.


Image:32px-Circle-style-warning.png

Note
Importante

Le joueur ne peut (a)voir qu'un seul checkpoint à la fois.



Image:32px-Ambox_warning_orange.png

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.


Callback Relatives

Les Callbacks ci dessous sont indirectement ou directement liées à cette Callback.

In other languages