ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
client

PlayerPedId

FiveM client native documentation with a Lua example.

Summary

Returns the ped handle for the local player. The fastest, simplest way to reference the current player's character on the client.

Returns

Ped (number) — the local player's ped handle.

Example

local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local health = GetEntityHealth(ped)

Common pitfalls

  • The handle changes on respawn or model change — call PlayerPedId() fresh rather than storing it long-term.
  • Cache it within a single frame's work, but refresh each tick if the ped can change.

Related natives

Related guides

Need protected areas on your map?

Viper Safe-Zone draws polygon safe zones in-game — no hand-edited coordinates — with weapon, combat and vehicle-speed rules per zone.

See Viper Safe-Zone →