RedM Index logoRedM Index
NativesHashesClothesBlipsPropsItem Tool
Sign inGet started

Reference

  • Natives
  • Hashes
  • Clothes
  • Blips
  • Props

Namespace

  1. Reference
  2. Natives
  3. GET_PLAYER_PED

GET_PLAYER_PED

Used to get the player's Ped Entity ID when a valid `playerSrc` is passed.

CFX

Signature

lua
GetPlayerPed(playerSrc)
-- returns Entity

Parameters

NameTypeDescription
char*The player source, passed as a string.

Usage

Named call
GetPlayerPed(playerSrc)
InvokeNative
Citizen.InvokeNative(0x6E31E993, playerSrc)
lua 1
-- Let's assume source is a valid ID
local pedId = GetPlayerPed(source);

-- If pedId is valid (not equal to 0)
if pedId ~= 0 then
    -- Do something with this ped!
end

Details

Hash
API set
Source
cfx

Source: cfx

On this page

  • Signature
  • Parameters
  • Usage
  • Details