GET_VEHICLE_NEON_COLOUR
Getter to check the neon colour of a vehicle.
Signature
void GET_VEHICLE_NEON_COLOUR(Vehicle vehicle, int* red, int* green, int* blue);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | The vehicle to check. |
red | int* | Pointer to an integer where the red component of the neon color will be stored. |
green | int* | Pointer to an integer where the green component of the neon color will be stored. |
blue | int* | Pointer to an integer where the blue component of the neon color will be stored. |
Returns void — None. The neon color values are retrieved and stored in the `red`, `green`, and `blue` pointers. Make sure to store the returned values in variables for further use.
Description
Getter to check the neon colour of a vehicle. This native is the server side getter of GET_VEHICLE_NEON_LIGHTS_COLOUR.
Usage
local red, green, blue = GetVehicleNeonColour(vehicle)
-- always works, by hash
local red, green, blue = Citizen.InvokeNative(0xd9319dcb, vehicle, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt())JavaScript and C#
const [red, green, blue] = GetVehicleNeonColour(vehicle);
// by hash
const [red, green, blue] = Citizen.invokeNative('0xd9319dcb', vehicle, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt());var red = new OutputArgument();
var green = new OutputArgument();
var blue = new OutputArgument();
Function.Call((Hash)0xd9319dcb, vehicle, red, green, blue);
// red.GetResult<int>()
// green.GetResult<int>()
// blue.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Examples
local vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false) -- 1 is the source here
local red, green, blue = GetVehicleNeonColour(vehicle)
print(red, green, blue)const vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
const [red, green, blue] = GetVehicleNeonColour(vehicle);
console.log(red, green, blue);using static CitizenFX.Core.Native.API;
int vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
int red, green, blue;
GetVehicleNeonColour(vehicle, out red, out green, out blue);
Debug.WriteLine($"{red}, {green}, {blue}");Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.