RedM Natives

NETWORK_GET_PLAYER_INDEX_FROM_PED

Returns the Player associated to a given Ped when in an online session.

Hash0x6C0E2E0125610278
Runtime nameNetworkGetPlayerIndexFromPed
NamespaceNETWORK
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x6C0E2E0125610278

Signature

Player NETWORK_GET_PLAYER_INDEX_FROM_PED(Ped ped);

Parameters

NameTypeDescription
pedPed—

Returns Player

Description

Returns the Player associated to a given Ped when in an online session.

Usage

Lua
local retval = NetworkGetPlayerIndexFromPed(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x6C0E2E0125610278, ped, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = NetworkGetPlayerIndexFromPed(ped);

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

Sources

alloc8or RDR3 NativeDB

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