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

Function

setVehicleSirens

ServerVehiclesIdentical to MTA:SA

Sets the position and colour of one siren point added with addVehicleSirens.

Syntax

bool setVehicleSirens(vehicle vehicle, int point, float x, float y, float z [, int r = 255, int g = 0, int b = 0, int a = 255, int minAlpha = 0])

Arguments

vehiclevehicle
The vehicle.
pointint
Point number from 1 to the count from addVehicleSirens.
xfloat
Offset to the right of the vehicle's centre (m).
yfloat
Offset forwards (m).
zfloat
Offset upwards (m).
rint, optional = 255
Red 0-255.
gint, optional = 0
Green 0-255.
bint, optional = 0
Blue 0-255.
aint, optional = 255
Opacity when flashing 0-255.
minAlphaint, optional = 0
Opacity between flashes 0-255.

Returns

true on success, false when the vehicle has no sirens or the point number is wrong.

Example

local vehicle = createVehicle(596, 1535, -1670, 13.4)
addVehicleSirens(vehicle, 1, 1)
setVehicleSirens(vehicle, 1, 0, 0.3, 1.1, 255, 150, 0, 255, 40)

Notes

State for scripts. As with addVehicleSirens: the game does not draw these points yet.

See also