- Documentation
- Server functions
- setVehicleWheelStates
Function
setVehicleWheelStates
Sets the state of a vehicle's wheels for every player: inflated, flat or fallen off. Argument order: front left, rear left, front right, rear right. For a bike the first two count (front, rear). Pass -1 or nil to leave a wheel unchanged.
Syntax
bool setVehicleWheelStates(vehicle vehicle [, int frontLeft = -1, int rearLeft = -1, int frontRight = -1, int rearRight = -1])Arguments
vehiclevehicle- The vehicle.
frontLeftint, optional = -1- Front left: 0 inflated, 1 flat, 2 fallen off, -1 unchanged.
rearLeftint, optional = -1- Rear left, values as above.
frontRightint, optional = -1- Front right.
rearRightint, optional = -1- Rear right.
Returns
true on success, false for an invalid value.
Example
addCommandHandler("kolczatka", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle then setVehicleWheelStates(vehicle, 1, 1, 1, 1) end
end)
See also
getVehicleWheelStatesReturns the state of a vehicle's four wheels in order: front left, rear left, front right, rear right (0 inflated, 1 flat, 2 fallen off).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.