# CFX::GET_VEHICLE_LIGHTS_STATE

- **Hash:** `0x7C278621`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetVehicleLightsState`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** named only
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_VEHICLE_LIGHTS_STATE

## Signature

```c
BOOL GET_VEHICLE_LIGHTS_STATE(Vehicle vehicle, BOOL* lightsOn, BOOL* highbeamsOn);
```

## Parameters

- `vehicle` (`Vehicle`)
- `lightsOn` (`BOOL*`)
- `highbeamsOn` (`BOOL*`)

## Returns

`BOOL`

## Usage

### Lua

```lua
local retval, lightsOn, highbeamsOn = GetVehicleLightsState(vehicle)

-- always available, by hash
local retval, lightsOn, highbeamsOn = Citizen.InvokeNative(0x7c278621, vehicle, Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.PointerValueInt() --[[ BOOL* ]], Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const [retval, lightsOn, highbeamsOn] = GetVehicleLightsState(vehicle);

// by hash
const [retval, lightsOn, highbeamsOn] = Citizen.invokeNative('0x7c278621', vehicle, Citizen.pointerValueInt() /* BOOL* */, Citizen.pointerValueInt() /* BOOL* */, Citizen.returnResultAnyway());
```

### C#

```csharp
var lightsOn = new OutputArgument();
var highbeamsOn = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x7c278621, vehicle, lightsOn, highbeamsOn);
// lightsOn.GetResult<bool>()
// highbeamsOn.GetResult<bool>()
```

- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

*Sources: Cfx.re native reference.*
