getPedAlertness
GET_PED_ALERTNESS0xF6AA118530443FD2The 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.
getPedAlertness(ped: Ped): numbergetPedAlertness(ped: Ped): integerUsage
JavaScript
const result = getPedAlertness(ped);Lua
local result = getPedAlertness(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
int JavaScript number, Lua integerNotes
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