- Documentation
- Server functions
- setVehicleDamageProof
Function
setVehicleDamageProof
Makes a vehicle damage proof for every player: collisions, shots and explosions do not take its health or break the body. Useful for showroom vehicles, city buses or vehicles in a safe zone.
Syntax
bool setVehicleDamageProof(vehicle element, bool value)Arguments
elementvehicle- The vehicle.
valuebooltrue= damage proof,false= normal.
Returns
true on success.
Example
local bus = createVehicle(431, 1760, -1890, 13.6)
setVehicleDamageProof(bus, true)
See also
isVehicleDamageProofChecks whether the vehicle is damage proof (setVehicleDamageProof).fixVehicleRepairs a vehicle to factory condition: 1000 health, and every door, body panel, lamp and wheel returns to undamaged; a wreck stops being a wreck. It also cancels a scheduled wreck respawn. For one second after the repair the server ignores damage reports from the game so the old damage does not come back. Colour, tuning and plate stay as they were.