M MY Multiplayer: Wiki
Side
Kind

setPedHeadBlend

Shared

Builds a ped's face by blending the head and skin of two parents.

bool setPedHeadBlend(ped ped, int father, int mother, int skinFather, int skinMother, float shapeMix, float skinMix)

Parameters

NameTypeDescription
pedpedThe ped or player.
fatherintThe father's head, from 0 to 255, among the heritage heads of the ped's head.
motherintThe mother's head, from 0 to 255.
skinFatherintThe father's skin tone, from 0 to 255.
skinMotherintThe mother's skin tone, from 0 to 255.
shapeMixfloatThe shape mix, from 0 (the father) to 1 (the mother).
skinMixfloatThe skin mix, from 0 (the father) to 1 (the mother).

Returns

true if it was applied. Raises an error if a parent is outside 0 to 255 or a mix is outside 0 to 1.

An index past the heads the ped's head declares wraps around to the start of the list. On the server, the change is sent to every client. On the client, it applies to this client only.

Example

addEventHandler("onPlayerSpawn", root, function()
    setPedHeadBlend(source, 2, 21, 2, 21, 0.5, 0.3)
end)
Coming from MTAMTA does not have this function. It follows FiveM's SetPedHeadBlendData.

See also