{"hash":"0xDD9540E7B1C9714F","ns":"PED","name":"_SET_PED_LOCAL_VFX_COLOR","slug":"_SET_PED_LOCAL_VFX_COLOR","official":false,"named":true,"luaName":"SetPedLocalVfxColor","game":"rdr3","apiset":"client","returnType":"void","params":[{"name":"ped","type":"Ped"},{"name":"vfxNodeHash","type":"Hash"},{"name":"r","type":"float"},{"name":"g","type":"float"},{"name":"b","type":"float"}],"summary":"Sets the RGB color for a specific volumetric VFX/particle node attached to a ped outfit or component.","descriptions":[{"source":"alloc8or","format":"text","body":"Sets the RGB color for a specific volumetric VFX/particle node attached to a ped outfit or component.\nObserved from RDO fm_mission_controller. The native only works if the component containing the VFX node is equipped.\nIt colors smoke/volumetrics and leaves core fire sprites untouched. Color values are normalized floats in the 0.0..1.0 range."},{"source":"vorp","format":"text","body":"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).\nIt only colors the smoke/volumetrics, leaving the core fire sprites untouched.\nValues 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)"}],"examples":[{"lang":"lua","code":"RegisterCommand(\"testcolor\", function()\n  \n        local playerPed = PlayerPedId()\n        local horse = GetMount(playerPed)\n\n        if  horse ~= 0 then\n            local outfitHash = -368114487\n            Citizen.InvokeNative(0x1902C4CFCC5BE57C, horse, outfitHash)\n            Citizen.InvokeNative(0x704C908E9C405136, horse)\n\n            Wait(500)\n\n            local componentHash = -929362906\n            local r, g, b = 1.0, 0.0, 0.0\n\n            Citizen.InvokeNative(0xDD9540E7B1C9714F, horse, componentHash, r, g, b)\n        end\nend, false)","source":"vorp"}],"aliases":["_SET_PED_TORCH_VFX_COLOR"],"enums":[],"related":[],"build":"1207","sources":["alloc8or","vorp"],"doc":3,"url":"https://natives.borderlinerp.com/natives/PED/_SET_PED_LOCAL_VFX_COLOR","markdownUrl":"https://natives.borderlinerp.com/natives/PED/_SET_PED_LOCAL_VFX_COLOR.md","snippets":{"lua":"SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b)","luaInvoke":"Citizen.InvokeNative(0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b)","js":"SetPedLocalVfxColor(ped, vfxNodeHash, r, g, b);","jsInvoke":"Citizen.invokeNative('0xDD9540E7B1C9714F', ped, vfxNodeHash, r + 0.0000001, g + 0.0000001, b + 0.0000001);","csharp":"Function.Call((Hash)0xDD9540E7B1C9714F, ped, vfxNodeHash, r, g, b);","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"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. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to 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 `InvokeNative` with the hash — it always works."]}}