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

Function

setVehicleNitroActivated

ServerVehiclesIdentical to MTA:SA

Stores nitro being switched on or off. Switching on uses one charge from setVehicleNitroCount (with -1 charges never run out); without charges the function returns false.

Syntax

bool setVehicleNitroActivated(vehicle vehicle, bool active)

Arguments

vehiclevehicle
The vehicle.
activebool
true = on, false = off.

Returns

true on success, false when there are no charges.

Example

local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleNitroCount(vehicle, 3)
setVehicleNitroActivated(vehicle, true)

Notes

State for scripts. In the game nitro works after fitting a nitro part (addVehicleUpgrade, e.g. 1010) and the driver fires it themselves; the nitro functions in this group (setVehicleNitroCount, setVehicleNitroLevel, setVehicleNitroActivated) store state on the server, but the game does not apply it yet.

See also