- Documentation
- Shared functions
- getVehicleLampStates
Function
getVehicleLampStates
Returns the state of all twelve lamps of a vehicle as a table of name → 'auto'/'on'/'off'.
Syntax
table getVehicleLampStates(vehicle vehicle)Arguments
vehiclevehicle- The vehicle.
Returns
A table { front_left = 'auto', ... }.
Example
local vehicle = createVehicle(411, 2000, -1690, 13.5)
for name, state in pairs(getVehicleLampStates(vehicle)) do
outputDebugString(name .. " = " .. state)
end
See also
getVehicleLampStateReturns the state of a lamp or lamp group set withsetVehicleLampState:'auto','on'or'off'. When the lamps in a group differ, it returns'mixed'.getVehicleLampNamesReturns the names of all twelve lamps accepted bysetVehicleLampState, in the order of numbers 0-11 (fromfront_lefttoindicator_rear_right). Groups (front,all…) are not in the list.resetVehicleLampStatesReturns all of a vehicle's lamps to'auto', i.e. working as in the game. Clears everything set withsetVehicleLampState.