doesShopPedApparelHaveRestrictionTag

DOES_SHOP_PED_APPAREL_HAVE_RESTRICTION_TAG0x341DE7ED1D2A1BFD

The GTA V native DOES_SHOP_PED_APPAREL_HAVE_RESTRICTION_TAG of the EXTRAMETADATA namespace, as LS:MP client scripts call it: the global function doesShopPedApparelHaveRestrictionTag, in JavaScript and in Lua.

SignatureJavaScript
doesShopPedApparelHaveRestrictionTag(
  componentHash: Hash,
  restrictionTagHash: Hash,
  componentId: number
): boolean
SignatureLua
doesShopPedApparelHaveRestrictionTag(
  componentHash: Hash,
  restrictionTagHash: Hash,
  componentId: integer
): boolean

Usage

JavaScript
const result = doesShopPedApparelHaveRestrictionTag(
  componentHash, restrictionTagHash, componentId
);
Lua
local result = doesShopPedApparelHaveRestrictionTag(
    componentHash, restrictionTagHash, componentId
)

Parameters

ParameterTypeJavaScriptLua
componentHashHashnumberinteger
restrictionTagHashHashnumberinteger
componentIdintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Full list of restriction tags by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedApparelRestrictionTags.json

componentId/last parameter seems to be unused.

Reference

Namespace
Shop metadata EXTRAMETADATA
In the game
BOOL DOES_SHOP_PED_APPAREL_HAVE_RESTRICTION_TAG(Hash componentHash, Hash restrictionTagHash, int componentId)
Hash
0x341DE7ED1D2A1BFD

Open in the interactive natives reference