ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setVehicleWheelStates

Function

setVehicleWheelStates

ServerVehiclesIdentical to MTA:SA

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