getPedDefensiveAreaPosition
GET_PED_DEFENSIVE_AREA_POSITION0x3C06B8786DD94CD1The GTA V native GET_PED_DEFENSIVE_AREA_POSITION of the PED namespace, as LS:MP client scripts call it: the global function getPedDefensiveAreaPosition, in JavaScript and in Lua.
getPedDefensiveAreaPosition(
ped: Ped,
p1: boolean
): { x: number, y: number, z: number }getPedDefensiveAreaPosition(ped: Ped, p1: boolean): Vector3Usage
JavaScript
const { x, y, z } = getPedDefensiveAreaPosition(ped, p1);Lua
local coords = getPedDefensiveAreaPosition(ped, p1)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
p1 | BOOL | boolean | boolean |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
Reference
- Namespace
- Ped PED
- In the game
Vector3 GET_PED_DEFENSIVE_AREA_POSITION(Ped ped, BOOL p1)- Hash
0x3C06B8786DD94CD1