isVehicleRespawnable | Multi Theft Auto: Wiki Skip to content

isVehicleRespawnable

Client-side
Server-side
Shared

Pair: toggleVehicleRespawn

Manual Review Required

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


This function check if the vehicle is respawnable.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:isRespawnable(...)
  • Variable: .respawnable

Syntax

bool isVehicleRespawnable ( vehicle theVehicle )
Required Arguments
  • theVehicle: The vehicle which you'd like to get respawn state of.

Returns

  • bool: value

Returns three true if the vehicle is respawnable, false otherwise.

Code Examples

shared
addCommandHandler("toggleRespawn",function(player)
for _,vehicle in ipairs(getElementsByType('vehicle')) do
toggleVehicleRespawn(vehicle, not isVehicleRespawnable(vehicle))
end
outputChatBox('Vehicles respawn state has been changed!', player)
end)

See Also

Vehicle Functions