isCopVehicleInArea3d
IS_COP_VEHICLE_IN_AREA_3D0x7EEF65D5F153E26AThe GTA V native IS_COP_VEHICLE_IN_AREA_3D of the VEHICLE namespace, as LS:MP client scripts call it: the global function isCopVehicleInArea3d, in JavaScript and in Lua.
isCopVehicleInArea3d(
x1: number,
x2: number,
y1: number,
y2: number,
z1: number,
z2: number
): booleanisCopVehicleInArea3d(
x1: number,
x2: number,
y1: number,
y2: number,
z1: number,
z2: number
): booleanUsage
JavaScript
const result = isCopVehicleInArea3d(x1, x2, y1, y2, z1, z2);Lua
local result = isCopVehicleInArea3d(x1, x2, y1, y2, z1, z2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x1 | float | number | number |
x2 | float | number | number |
y1 | float | number | number |
y2 | float | number | number |
z1 | float | number | number |
z2 | float | number | number |
Returns
BOOL JavaScript boolean, Lua booleanNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Usage:
public bool isCopInRange(Vector3 Location, float Range)
{
return Function.Call<bool>(Hash.IS_COP_PED_IN_AREA_3D, Location.X - Range, Location.Y - Range, Location.Z - Range, Location.X + Range, Location.Y + Range, Location.Z + Range);
}Reference
- Namespace
- Vehicle VEHICLE
- In the game
BOOL IS_COP_VEHICLE_IN_AREA_3D(float x1, float x2, float y1, float y2, float z1, float z2)- Hash
0x7EEF65D5F153E26A