The Lab
DECORATOR native

_DECOR_GET_PLAYER_INDEX

returns int2 paramsbuild 1207

Reads the player-index decorator named propertyName from entity and returns it.

Signature

C
int _DECOR_GET_PLAYER_INDEX(Entity entity, const char* propertyName); // 0xB1682B2443F0540B b1207

Parameters

#NameType
1entityEntity
2propertyNameconst char*

Facts

Facts about _DECOR_GET_PLAYER_INDEX
Name
_DECOR_GET_PLAYER_INDEX
Hash
0xB1682B2443F0540B
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0xB1682B2443F0540B, -- _DECOR_GET_PLAYER_INDEX
  PlayerPedId(), -- Entity entity
  "text", -- const char* propertyName
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
const result = Citizen.invokeNative("0xB1682B2443F0540B", // _DECOR_GET_PLAYER_INDEX
  PlayerPedId(), // Entity entity
  "text", // const char* propertyName
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0xB1682B2443F0540B, // _DECOR_GET_PLAYER_INDEX
  API.PlayerPedId(), // Entity entity
  "text" // const char* propertyName
);
All DECORATOR natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.