GET_VEHICLE_NEON_ENABLED
Getter to check if one of the neon lights of a vehicle is enabled.
Signature
BOOL GET_VEHICLE_NEON_ENABLED(Vehicle vehicle, int neonIndex);Parameters
| Name | Type | Description |
|---|---|---|
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
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.
enum neonIndex
{
NEON_BACK = 0, // Back neon
NEON_RIGHT = 1, // Right neon
NEON_LEFT = 2, // Left neon
NEON_FRONT = 3 // Front neon
};Usage
local retval = GetVehicleNeonEnabled(vehicle, neonIndex)
-- always works, by hash
local retval = Citizen.InvokeNative(0x684bdbf2, vehicle, neonIndex, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = GetVehicleNeonEnabled(vehicle, neonIndex);
// by hash
const retval = Citizen.invokeNative('0x684bdbf2', vehicle, neonIndex, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0x684bdbf2, vehicle, neonIndex);Examples
local vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false) -- 1 is the source here
local isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1)
print(isRightNeonOn)const vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
const isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1);
console.log(isRightNeonOn);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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.