SetVehicleVelocity
From SA-MP Wiki
(Difference between revisions)
Revision as of 18:55, 1 July 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 23:03, 31 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{0.3Added|function|}} | {{0.3Added|function|}} | ||
Line 34: | Line 33: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:SetVehicleVelocity]] | ||
[[ru:SetVehicleVelocity]] | [[ru:SetVehicleVelocity]] |
Revision as of 23:03, 31 January 2014
Description:
Sets the X, Y and Z velocity of a vehicle.
(vehicleid, Float:x, Float:y, Float:z)
vehicleid | The ID of the vehicle to set the velocity of. |
Float:x | The velocity in the X direction. |
Float:y | The velocity in the Y direction . |
Float:z | The velocity in the Z direction. |
Return Values:
This function does not return any specific values.
public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/jump", cmdtext)) { if(IsPlayerInAnyVehicle(playerid)) SetVehicleVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 0.2); return 1; } }
- SetPlayerVelocity: Set a player's velocity.
- GetPlayerVelocity: Get a player's velocity.
- GetVehicleVelocity: Get a vehicle's velocity.
- SetVehicleAngularVelocity: Set the angular velocity of a vehicle.