networkGetPlayerIndexFromPed
NETWORK_GET_PLAYER_INDEX_FROM_PED0x6C0E2E0125610278The GTA V native NETWORK_GET_PLAYER_INDEX_FROM_PED of the NETWORK namespace, as LS:MP client scripts call it: the global function networkGetPlayerIndexFromPed, in JavaScript and in Lua.
networkGetPlayerIndexFromPed(ped: Ped): PlayernetworkGetPlayerIndexFromPed(ped: Ped): PlayerUsage
JavaScript
const player = networkGetPlayerIndexFromPed(ped);Lua
local player = networkGetPlayerIndexFromPed(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
Player JavaScript number, Lua integerThe game's own player index: a local slot, as playerId() returns it. Not an LS:MP playerId.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns the Player associated to a given Ped when in an online session.
Reference
- Namespace
- Network NETWORK
- In the game
Player NETWORK_GET_PLAYER_INDEX_FROM_PED(Ped ped)- Hash
0x6C0E2E0125610278