setVehicleHydraulics
Shared
Fits or removes a vehicle's hydraulics.
bool setVehicleHydraulics(element vehicle, bool fitted)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | element | The vehicle. It can also be a parent element: every vehicle below it changes. |
| fitted | bool | true fits them, false removes them. |
Returns
true if the element given is a vehicle and it changed. With a parent element, the vehicles below it change even when the result is false.
Called on the server, the change reaches every player.
Example
addCommandHandler("hidraulica", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle then
setVehicleHydraulics(vehicle, not getVehicleHydraulics(vehicle))
end
end)