SetVehicleVelocity FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 03:57, 5 January 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 19:33, 6 January 2013 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
+ | {{Scripting}} | ||
+ | {{Title}} | ||
+ | |||
+ | {{0.3AddedFR|fonction|}} | ||
+ | |||
+ | {{Description|Modifier la vitesse X, Y et Z d'un véhicule}} | ||
+ | |||
+ | {{note2FR|Cette fonction n'a pas d'effet sur les véhicules inoccupés et sur les trains.}} | ||
+ | |||
+ | {{Parameters|vehicleid, Float:x, Float:y, Float:z}} | ||
+ | {{Param|vehicleid|L'ID du véhicule}} | ||
+ | {{Param|Float:x|La vitesse (Float) X.}} | ||
+ | {{Param|Float:y|La vitesse (Float) Y.}} | ||
+ | {{Param|Float:z|La vitesse (Float) Z.}} | ||
+ | |||
+ | {{NoReturn}} | ||
+ | |||
+ | <pawn> | ||
+ | public OnPlayerCommandText(playerid, cmdtext[]) | ||
+ | { | ||
+ | if (!strcmp("/carjump", cmdtext)) | ||
+ | { | ||
+ | if(IsPlayerInAnyVehicle(playerid)) | ||
+ | SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.2); | ||
+ | return 1; | ||
+ | } | ||
+ | } | ||
+ | </pawn> | ||
+ | |||
+ | {{RelatedFunctionsFR}} | ||
+ | *[[SetPlayerVelocity_FR|SetPlayerVelocity:]] Modifier la vitesse X, Y et Z d'un joueur | ||
+ | *[[GetPlayerVelocity_FR|GetPlayerVelocity:]] Récupérer la vitesse X, Y et Z d'un joueur | ||
+ | *[[GetVehicleVelocity_FR|GetVehicleVelocity:]] Récupérer la vitesse X, Y et Z d'un véhicule | ||
+ | *[[SetVehicleAngularVelocity_FR|SetVehicleAngularVelocity:]] Modifier la vitesse d'angle d'un véhicule | ||
+ | |||
[[Category:Scripting Functions FR]] | [[Category:Scripting Functions FR]] |
Revision as of 19:33, 6 January 2013
Description:
Modifier la vitesse X, Y et Z d'un véhicule
(vehicleid, Float:x, Float:y, Float:z)
vehicleid | L'ID du véhicule |
Float:x | La vitesse (Float) X. |
Float:y | La vitesse (Float) Y. |
Float:z | La vitesse (Float) Z. |
Return Values:
This function does not return any specific values.
public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/carjump", cmdtext)) { if(IsPlayerInAnyVehicle(playerid)) SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.2); return 1; } }
Fonctions Relatives
Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.
- SetPlayerVelocity: Modifier la vitesse X, Y et Z d'un joueur
- GetPlayerVelocity: Récupérer la vitesse X, Y et Z d'un joueur
- GetVehicleVelocity: Récupérer la vitesse X, Y et Z d'un véhicule
- SetVehicleAngularVelocity: Modifier la vitesse d'angle d'un véhicule