PedClient

getPedAlertness

GET_PED_ALERTNESS0xF6AA118530443FD2

The GTA V native GET_PED_ALERTNESS of the PED namespace, as LS:MP client scripts call it: the global function getPedAlertness, in JavaScript and in Lua.

SignatureJavaScript
getPedAlertness(ped: Ped): number
SignatureLua
getPedAlertness(ped: Ped): integer

Usage

JavaScript
const result = getPedAlertness(ped);
Lua
local result = getPedAlertness(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Returns the ped's alertness (0-3).

Values :

0 : Neutral
1 : Heard something (gun shot, hit, etc)
2 : Knows (the origin of the event)
3 : Fully alerted (is facing the event?)

If the Ped does not exist, returns -1.

Reference

Namespace
Ped PED
In the game
int GET_PED_ALERTNESS(Ped ped)
Hash
0xF6AA118530443FD2

Open in the interactive natives reference