addPedDecorationFromHashes
ADD_PED_DECORATION_FROM_HASHES0x5F5D1665E352A839The GTA V native ADD_PED_DECORATION_FROM_HASHES of the PED namespace, as LS:MP client scripts call it: the global function addPedDecorationFromHashes, in JavaScript and in Lua.
addPedDecorationFromHashes(ped: Ped, collection: Hash, overlay: Hash): voidaddPedDecorationFromHashes(ped: Ped, collection: Hash, overlay: Hash)Usage
addPedDecorationFromHashes(ped, collection, overlay);addPedDecorationFromHashes(ped, collection, overlay)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
collection | Hash | number | integer |
overlay | Hash | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Applies an Item from a PedDecorationCollection to a ped. These include tattoos and shirt decals.
collection - PedDecorationCollection filename hash
overlay - Item name hash
Example:
Entry inside "mpbeach_overlays.xml" -
<Item>
<uvPos x="0.500000" y="0.500000" />
<scale x="0.600000" y="0.500000" />
<rotation value="0.000000" />
<nameHash>FM_Hair_Fuzz</nameHash>
<txdHash>mp_hair_fuzz</txdHash>
<txtHash>mp_hair_fuzz</txtHash>
<zone>ZONE_HEAD</zone>
<type>TYPE_TATTOO</type>
<faction>FM</faction>
<garment>All</garment>
<gender>GENDER_DONTCARE</gender>
<award />
<awardLevel />
</Item>
Code:addPedDecorationFromHashes(playerPedId(), getHashKey("mpbeach_overlays"), getHashKey("fm_hair_fuzz"))
Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json
Reference
- Namespace
- Ped PED
- In the game
void ADD_PED_DECORATION_FROM_HASHES(Ped ped, Hash collection, Hash overlay)- Hash
0x5F5D1665E352A839- Formerly
_APPLY_PED_OVERLAY_SET_PED_DECORATION