getPlayerPedScriptIndex
GET_PLAYER_PED_SCRIPT_INDEX0x50FAC3A3E030A6E1The GTA V native GET_PLAYER_PED_SCRIPT_INDEX of the PLAYER namespace, as LS:MP client scripts call it: the global function getPlayerPedScriptIndex, in JavaScript and in Lua.
getPlayerPedScriptIndex(player: Player): PedgetPlayerPedScriptIndex(player: Player): PedUsage
JavaScript
const ped = getPlayerPedScriptIndex(player);Lua
local ped = getPlayerPedScriptIndex(player)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
Returns
Ped JavaScript number, Lua integerGame handle of a ped. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Identical to getPlayerPed
Reference
- Namespace
- Player PLAYER
- In the game
Ped GET_PLAYER_PED_SCRIPT_INDEX(Player player)- Hash
0x50FAC3A3E030A6E1