RedM Natives

SET_PED_HEAD_OVERLAY

OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0.

Hash0xD28DBA90
Runtime nameSetPedHeadOverlay
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

void SET_PED_HEAD_OVERLAY(Ped ped, int overlayID, int index, float opacity);

Parameters

NameTypeDescription
pedPed

The ped entity

overlayIDint

The overlay id displayed up above.

indexint

An integer representing the index (from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1)

opacityfloat

A float ranging from 0.0 to 1.0

Returns void

Description

Cfx.re native reference

OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0.
overlayID       Part                  Index, to disable
0               Blemishes             0 - 23, 255
1               Facial Hair           0 - 28, 255
2               Eyebrows              0 - 33, 255
3               Ageing                0 - 14, 255
4               Makeup                0 - 74, 255
5               Blush                 0 - 6, 255
6               Complexion            0 - 11, 255
7               Sun Damage            0 - 10, 255
8               Lipstick              0 - 9, 255
9               Moles/Freckles        0 - 17, 255
10              Chest Hair            0 - 16, 255
11              Body Blemishes        0 - 11, 255
12              Add Body Blemishes    0 - 1, 255

Note: You may need to call SetPedHeadBlendData prior to calling this native in order for it to work.

This is the server-side RPC native equivalent of the client native SET_PED_HEAD_OVERLAY.

Usage

Lua
SetPedHeadOverlay(ped, overlayID, index, opacity)

-- always works, by hash
Citizen.InvokeNative(0xd28dba90, ped, overlayID, index, opacity)
JavaScript and C#
JavaScript
SetPedHeadOverlay(ped, overlayID, index, opacity);

// by hash
Citizen.invokeNative('0xd28dba90', ped, overlayID, index, opacity + 0.0000001);
C#
Function.Call((Hash)0xd28dba90, ped, overlayID, index, opacity);
  • 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.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.