RedM Natives

IS_PED_A_PLAYER

This native checks if the given ped is a player.

Hash0x404794CA
Runtime nameIsPedAPlayer
NamespaceCFX
SideServer
NameOfficial
Docs

Signature

BOOL IS_PED_A_PLAYER(Ped ped);

Parameters

NameTypeDescription
pedPed—

Returns BOOL — Returns `true` if the ped is a player, `false` otherwise.

Description

Cfx.re native reference

This native checks if the given ped is a player.

Usage

Lua
local retval = IsPedAPlayer(ped)

-- always works, by hash
local retval = Citizen.InvokeNative(0x404794ca, ped, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = IsPedAPlayer(ped);

// by hash
const retval = Citizen.invokeNative('0x404794ca', ped, Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x404794ca, ped);

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.