# CFX::GET_VEHICLE_NEON_ENABLED

- **Hash:** `0x684BDBF2`
- **Namespace:** CFX
- **Runtime name (Lua/JS):** `GetVehicleNeonEnabled`
- **Side:** server (Cfx runtime native)
- **Name status:** official
- **Documentation:** described with examples
- **URL:** https://natives.borderlinerp.com/natives/CFX/GET_VEHICLE_NEON_ENABLED

## Signature

```c
BOOL GET_VEHICLE_NEON_ENABLED(Vehicle vehicle, int neonIndex);
```

## Parameters

- `vehicle` (`Vehicle`) — The vehicle to check.
- `neonIndex` (`int`) — A value from the neonIndex enum representing the neon light to check.

## Returns

`BOOL` — Returns `true` if the specified neon light is enabled, `false` otherwise.

## Description

*Source: Cfx.re native reference*

Getter to check if one of the neon lights of a vehicle is enabled. This native is the server side getter of [IS_VEHICLE_NEON_LIGHT_ENABLED](#\_0x8C4B92553E4766A5).

```cpp
enum neonIndex
{
    NEON_BACK = 0,   // Back neon
    NEON_RIGHT = 1,  // Right neon
    NEON_LEFT = 2,   // Left neon
    NEON_FRONT = 3   // Front neon
};
```

## Usage

### Lua

```lua
local retval = GetVehicleNeonEnabled(vehicle, neonIndex)

-- always available, by hash
local retval = Citizen.InvokeNative(0x684bdbf2, vehicle, neonIndex, Citizen.ReturnResultAnyway())
```

### JavaScript

```js
const retval = GetVehicleNeonEnabled(vehicle, neonIndex);

// by hash
const retval = Citizen.invokeNative('0x684bdbf2', vehicle, neonIndex, Citizen.returnResultAnyway());
```

### C#

```csharp
bool retval = Function.Call<bool>((Hash)0x684bdbf2, vehicle, neonIndex);
```

## Examples

*Source: Cfx.re native reference*

```lua
local vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false) -- 1 is the source here
local isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1)
print(isRightNeonOn)
```

*Source: Cfx.re native reference*

```js
const vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
const isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1);
console.log(isRightNeonOn);
```

*Source: Cfx.re native reference*

```cs
using static CitizenFX.Core.Native.API;

int vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
bool isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1);
Debug.WriteLine($"{isRightNeonOn}");
```

*Sources: Cfx.re native reference.*
