SetVehicleToRespawn

From SA-MP Wiki

Jump to: navigation, search


Description:

Sets a vehicle back to the position at where it was created.


Parameters:
(vehicleid)
vehicleidThe ID of the vehicle to respawn


Return Values:

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


Example Usage:

// Respawns the first vehicle.
SetVehicleToRespawn(1);

Or you can also make every vehicle in the whole script to respawn:

for(new i = GetVehiclePoolSize(); i > 0; i--)
{
	SetVehicleToRespawn(i);
}

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