RedM Natives

GET_META_PED_ASSET_GUIDS

This is a way to get what drawables a ped has equipped

Hash0xA9C28516A6DC9D56
Runtime nameGetMetaPedAssetGuids
NamespacePED
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

NameTypeDescription
pedPed—
indexint—
drawableHash*—
albedoHash*—
normalHash*—
materialHash*—

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

Lua
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#
JavaScript
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());
C#
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

alloc8or RDR3 NativeDB

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