RedM Natives

GET_PLAYER_PED_SCRIPT_INDEX

Does the same like PLAYER::GET_PLAYER_PED

Hash0x5C880F9056D784C8
Runtime nameGetPlayerPedScriptIndex
NamespacePLAYER
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x50FAC3A3E030A6E1

Signature

Ped GET_PLAYER_PED_SCRIPT_INDEX(Player player);

Parameters

NameTypeDescription
playerPlayer—

Returns Ped

Description

Does the same like PLAYER::GET_PLAYER_PED

Usage

Lua
local retval = GetPlayerPedScriptIndex(player)

-- always works, by hash
local retval = Citizen.InvokeNative(0x5C880F9056D784C8, player, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = GetPlayerPedScriptIndex(player);

// by hash
const retval = Citizen.invokeNative('0x5C880F9056D784C8', player, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x5C880F9056D784C8, player);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.