SetVehiclePos

From SA-MP Wiki

Jump to: navigation, search


Description:

Set a vehicle's position


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

Important
Note

An empty vehicle will not fall after being teleported into the air.


Parameters:
(vehicleid, Float:x, Float:y, Float:z)
vehicleidVehicle ID that you want set new position.
Float:xThe X coordinate to position the vehicle at.
Float:yThe Y coordinate to position the vehicle at.
Float:zThe Z coordinate to position the vehicle at.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. The vehicle specified does not exist.


// Put the player's vehicle at the coordinates 0, 0, 3 (center of SA)
new vehicleid = GetPlayerVehicleID(playerid);
SetVehiclePos(vehicleid, 0, 0, 3);

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
Navigation
Toolbox
In other languages