ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getVehicleLampState

Function

getVehicleLampState

Server and clientVehiclesTrilogy Hub only

Returns the state of a lamp or lamp group set with setVehicleLampState: 'auto', 'on' or 'off'. When the lamps in a group differ, it returns 'mixed'.

Syntax

string getVehicleLampState(vehicle vehicle, string/int lamp)

Arguments

vehiclevehicle
The vehicle.
lampstring/int
Lamp name, group or number 0-11 (as in setVehicleLampState).

Returns

'auto', 'on', 'off' or 'mixed'.

Example

local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleLampState(vehicle, "front_left", "off")
outputDebugString(getVehicleLampState(vehicle, "front"))

See also