SetVehicleToRespawn
From SA-MP Wiki
Description:
Sets a vehicle back to the position at where it was created.
(vehicleid)
vehicleid | The 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.
- CreateVehicle: Create a vehicle.
- DestroyVehicle: Destroy a vehicle.