setVehicleLights
SET_VEHICLE_LIGHTS0x34E710FF01247C5AThe GTA V native SET_VEHICLE_LIGHTS of the VEHICLE namespace, as LS:MP client scripts call it: the global function setVehicleLights, in JavaScript and in Lua.
setVehicleLights(vehicle: Vehicle, state: number): voidsetVehicleLights(vehicle: Vehicle, state: integer)Usage
setVehicleLights(vehicle, state);setVehicleLights(vehicle, state)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
vehicle | Vehicle | number | integer |
state | int | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
set's if the vehicle has lights or not.
not an on off toggle.
p1 = 0 ;vehicle normal lights, off then lowbeams, then highbeams
p1 = 1 ;vehicle doesn't have lights, always off
p1 = 2 ;vehicle has always on lights
p1 = 3 ;or even larger like 4,5,... normal lights like =1
note1: when using =2 on day it's lowbeam,highbeam
but at night it's lowbeam,lowbeam,highbeam
note2: when using =0 it's affected by day or night for highbeams don't exist in daytime.
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void SET_VEHICLE_LIGHTS(Vehicle vehicle, int state)- Hash
0x34E710FF01247C5A