The Lab
PED native

_GET_PED_INDEX_FROM_PERSCHAR_HASH

returns Ped2 paramsbuild 1207

Returns the ped spawned for the persistent character persCharHash.

Signature

C
Ped _GET_PED_INDEX_FROM_PERSCHAR_HASH(Hash persCharHash, int p1); // 0xE76687023D8C8505 b1207

Parameters

#NameType
1persCharHashHash
2p1int

Facts

Facts about _GET_PED_INDEX_FROM_PERSCHAR_HASH
Name
_GET_PED_INDEX_FROM_PERSCHAR_HASH
Hash
0xE76687023D8C8505
Namespace
Returns
Ped
Game build
1207

Examples

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

Lua
local ped = Citizen.InvokeNative(0xE76687023D8C8505, -- _GET_PED_INDEX_FROM_PERSCHAR_HASH
  GetHashKey("name"), -- Hash persCharHash
  0, -- int p1
  Citizen.ResultAsInteger()
)
print(ped)
JavaScript
const ped = Citizen.invokeNative("0xE76687023D8C8505", // _GET_PED_INDEX_FROM_PERSCHAR_HASH
  GetHashKey("name"), // Hash persCharHash
  0, // int p1
  Citizen.resultAsInteger()
);
console.log(ped)
C#
int ped = Function.Call<int>((Hash)0xE76687023D8C8505, // _GET_PED_INDEX_FROM_PERSCHAR_HASH
  (uint)API.GetHashKey("name"), // Hash persCharHash
  0 // int p1
);
All PED natives

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