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

Function

getVehicleIndicators

Server and clientVehiclesTrilogy Hub only

Returns the indicator state: 0 off, 1 left, 2 right, 3 hazard. Works on both sides.

Syntax

int getVehicleIndicators(vehicle vehicle)

Arguments

vehiclevehicle
The vehicle.

Returns

0-3.

Example

addEventHandler("onClientRender", root, function()
    local vehicle = getPedOccupiedVehicle(localPlayer)
    local state = vehicle and getVehicleIndicators(vehicle) or 0
    if state == 1 or state == 3 then dxDrawText("<", 900, 900) end
    if state == 2 or state == 3 then dxDrawText(">", 1000, 900) end
end)

See also