Metaped getter natives return data via Citizen.PointerValueInt() out-slots, not return values
Context
Several metaped/clothing query natives write their results into caller-supplied pointer slots rather than returning them. Writing local tint = GetMetaPedAssetTint(ped, i) gets garbage.
The pattern
-- GET_META_PED_ASSET_TINT 0xE7998FEC53A33BBE — 4 int out-slots:
local pal, t0, t1, t2 = InvokeNative(0xE7998FEC53A33BBE, ped, index,
Citizen.PointerValueInt(), Citizen.PointerValueInt(),
Citizen.PointerValueInt(), Citizen.PointerValueInt())
The values come back as multiple Lua returns in pointer order. Same mechanism for _GET_SHOP_ITEM_BASE_LAYERS (0x63342C50EC115CE8, eight out-slots) and GET_META_PED_ASSET_GUIDS (0xA9C28516A6DC9D56).
Trap
These look like ordinary getters but the "return value" is actually the native's status; the real outputs are the PointerValueInt() placeholders you pass in.
Verified
component/g_client.lua:57-60.
Linked natives
GET_META_PED_ASSET_GUIDS(0xA9C28516A6DC9D56)GET_META_PED_ASSET_TINT(0xE7998FEC53A33BBE)_GET_SHOP_ITEM_BASE_LAYERS(0x63342C50EC115CE8)
Tags: ped, metaped, pointervalueint, out-param, tint, component
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:42:50.432Z