GET_META_PED_ASSET_GUIDS
This is a way to get what drawables a ped has equipped
Hash
0xA9C28516A6DC9D56Runtime name
GetMetaPedAssetGuidsNamespacePED
SideClient
NameOfficial
Docs
Since build1207
Signature
BOOL GET_META_PED_ASSET_GUIDS(Ped ped, int index, Hash* drawable, Hash* albedo, Hash* normal, Hash* material);Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
index | int | — |
drawable | Hash* | — |
albedo | Hash* | — |
normal | Hash* | — |
material | Hash* | — |
Returns BOOL
Description
This is a way to get what drawables a ped has equipped
Example: you are able to tell if the ped has the drawable PLAYER_ZERO_HAT_017 attached
Note: this works with non shop components, direct .ydd files.
Usage
local retval, drawable, albedo, normal, material = GetMetaPedAssetGuids(ped, index)
-- always works, by hash
local retval, drawable, albedo, normal, material = Citizen.InvokeNative(0xA9C28516A6DC9D56, ped, index, Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.PointerValueInt(), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, drawable, albedo, normal, material] = GetMetaPedAssetGuids(ped, index);
// by hash
const [retval, drawable, albedo, normal, material] = Citizen.invokeNative('0xA9C28516A6DC9D56', ped, index, Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.pointerValueInt(), Citizen.returnResultAnyway());var drawable = new OutputArgument();
var albedo = new OutputArgument();
var normal = new OutputArgument();
var material = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xA9C28516A6DC9D56, ped, index, drawable, albedo, normal, material);
// drawable.GetResult<int>()
// albedo.GetResult<int>()
// normal.GetResult<int>()
// material.GetResult<int>()- Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.