_SET_PED_LOCAL_VFX_COLOR
Sets the RGB color for a specific volumetric VFX/particle node attached to a ped outfit or component.
0xDD9540E7B1C9714FSetPedLocalVfxColor_SET_PED_TORCH_VFX_COLORSignature
void _SET_PED_LOCAL_VFX_COLOR(Ped ped, Hash vfxNodeHash, float r, float g, float b);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
vfxNodeHash | Hash | — |
r | float | — |
g | float | — |
b | float | — |
Returns void
Description
Sets the RGB color for a specific volumetric VFX/particle node attached to a ped outfit or component.
Observed from RDO fm_mission_controller. The native only works if the component containing the VFX node is equipped.
It colors smoke/volumetrics and leaves core fire sprites untouched. Color values are normalized floats in the 0.0..1.0 range.
The native WILL NOT WORK if the specific component containing the VFX node is not equipped on the ped (e.g., the torch outfit -368114487 must be equipped first via _EQUIP_META_PED_OUTFIT).
It only colors the smoke/volumetrics, leaving the core fire sprites untouched.
Values greater than 1.0f are clamped to 1.0f by the engine. To achieve specific RGB shades, you MUST normalize 0-255 values by dividing them by 255.0f (e.g., 128 becomes 0.5f)
Usage
SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b)
-- always works, by hash
Citizen.InvokeNative(0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b)JavaScript and C#
SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b);
// by hash
Citizen.invokeNative('0xDD9540E7B1C9714F', ped, vfxNodeHash, r + 0.0000001, g + 0.0000001, b + 0.0000001);Function.Call((Hash)0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason. - The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Examples
RegisterCommand("testcolor", function()
local playerPed = PlayerPedId()
local horse = GetMount(playerPed)
if horse ~= 0 then
local outfitHash = -368114487
Citizen.InvokeNative(0x1902C4CFCC5BE57C, horse, outfitHash)
Citizen.InvokeNative(0x704C908E9C405136, horse)
Wait(500)
local componentHash = -929362906
local r, g, b = 1.0, 0.0, 0.0
Citizen.InvokeNative(0xDD9540E7B1C9714F, horse, componentHash, r, g, b)
end
end, false)Sources
alloc8or RDR3 NativeDB · VORPCORE RDR3natives
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.