doesCurrentPedComponentHaveRestrictionTag

DOES_CURRENT_PED_COMPONENT_HAVE_RESTRICTION_TAG0x7796B21B76221BC5

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

SignatureJavaScript
doesCurrentPedComponentHaveRestrictionTag(
  ped: Ped,
  componentId: number,
  restrictionTagHash: Hash
): boolean
SignatureLua
doesCurrentPedComponentHaveRestrictionTag(
  ped: Ped,
  componentId: integer,
  restrictionTagHash: Hash
): boolean

Usage

JavaScript
const result = doesCurrentPedComponentHaveRestrictionTag(ped, componentId, restrictionTagHash);
Lua
local result = doesCurrentPedComponentHaveRestrictionTag(ped, componentId, restrictionTagHash)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
componentIdintnumberinteger
restrictionTagHashHashnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Shop metadata EXTRAMETADATA
In the game
BOOL DOES_CURRENT_PED_COMPONENT_HAVE_RESTRICTION_TAG(Ped ped, int componentId, Hash restrictionTagHash)
Hash
0x7796B21B76221BC5
Introduced
Game build 2612 legacy numbering
Formerly
_DOES_CUSTOMIZATION_COMPONENT_HAVE_RESTRICTION_TAG

Open in the interactive natives reference