- Documentation
- Shared functions
- getVehicleIndicators
Function
getVehicleIndicators
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)