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

Function

addVehicleSirens

ServerVehiclesIdentical to MTA:SA

Stores a set of custom siren lights for the vehicle: number of points, type and flags. After it, setVehicleSirens sets the position and colour of each point.

Syntax

bool addVehicleSirens(vehicle vehicle, int sirenCount, int sirenType [, bool flag360 = false, bool checkLos = true, bool randomiser = true, bool silent = false])

Arguments

vehiclevehicle
The vehicle.
sirenCountint
Number of lights 1-8.
sirenTypeint
Flash type 1-6.
flag360bool, optional = false
Lights visible from every side.
checkLosbool, optional = true
Check whether the lights are blocked from view.
randomiserbool, optional = true
Random flash order.
silentbool, optional = false
Light bar without siren sound.

Returns

true on success.

Example

local vehicle = createVehicle(596, 1535, -1670, 13.4)
addVehicleSirens(vehicle, 2, 2, true)
setVehicleSirens(vehicle, 1, -0.5, 0, 1, 255, 0, 0)
setVehicleSirens(vehicle, 2, 0.5, 0, 1, 0, 0, 255)

Notes

State for scripts. The game does not draw custom siren points yet; vehicles with a game siren flash their factory light bar (setVehicleSirensOn).

See also