toggleVehicleRespawn | Multi Theft Auto: Wiki Skip to content

toggleVehicleRespawn

Client-side
Server-side
Shared

Pair: isVehicleRespawnable

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function toggles whether or not the vehicle will be respawned after blown or idle.

Syntax

toggleVehicleRespawn ( )

Code Examples

server

This example defines a console command that will disable respawning for the vehicle that the player is currently in.

function doNotRespawn ( thePlayer )
local theVehicle = getPlayerOccupiedVehicle ( thePlayer )
if ( theVehicle ) then
toggleVehicleRespawn ( theVehicle, false ) -- tell the server not to respawn this vehicle
end
end
addCommandHandler("donotrespawn", doNotRespawn)

See Also

Vehicle Functions