Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 760 Bytes

File metadata and controls

27 lines (20 loc) · 760 Bytes
ns PLAYER

GET_PLAYER_PED

// 0x43A66C31C68491C0 0x6E31E993
Ped GET_PLAYER_PED(Player playerId);

Gets the ped for a specified player index.

Note: For performance reasons, usage of PLAYER_PED_ID is recommended over the use of GetPlayerPed(-1) when wanting to acquire your local player ped. For more information, please refer to this forum post.

Parameters

  • playerId: The player index, or -1 to get the local player ped.

Return value

The specified player's ped, or 0 if invalid.

Examples

local playerIdx = GetPlayerFromServerId(source)
local ped = GetPlayerPed(playerIdx)

-- act on the ped