PlayerClient

playerPedId

PLAYER_PED_ID0xD80958FC74E988A6

The GTA V native PLAYER_PED_ID of the PLAYER namespace, as LS:MP client scripts call it: the global function playerPedId, in JavaScript and in Lua.

SignatureJavaScript
playerPedId(): Ped
SignatureLua
playerPedId(): Ped

Usage

JavaScript
const ped = playerPedId();
Lua
local ped = playerPedId()

Parameters

None.

Returns

Ped JavaScript number, Lua integer

Game 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.

Returns current player ped

Reference

Namespace
Player PLAYER
In the game
Ped PLAYER_PED_ID()
Hash
0xD80958FC74E988A6

Open in the interactive natives reference