| Property | Value |
|---|---|
| Native Name | GET_PLAYER_PED |
| Hash | 0x43A66C31C68491C0 |
| Return Type | Ped |
| Parameters | playerId (Player) |
Description: 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(Player) — The player index, or -1 to get the local player ped.
Examples
local playerIdx = GetPlayerFromServerId(source)
local ped = GetPlayerPed(playerIdx)
-- act on the ped