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
| Name | Type | Description |
|---|---|---|
| ped | ped | The ped or player. |
| father | int | The father's head, from 0 to 255, among the heritage heads of the ped's head. |
| mother | int | The mother's head, from 0 to 255. |
| skinFather | int | The father's skin tone, from 0 to 255. |
| skinMother | int | The mother's skin tone, from 0 to 255. |
| shapeMix | float | The shape mix, from 0 (the father) to 1 (the mother). |
| skinMix | float | The 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.