_CREATE_GUARD_ZONE_FOR_ENTITY
Creates a guard zone named guardZoneName around entity at the given coordinates, returning true on success.
Signature
BOOL _CREATE_GUARD_ZONE_FOR_ENTITY(const char* guardZoneName, Entity entity, float x, float y, float z); // 0x0D4B77E862475ED3 b1311Parameters
| # | Name | Type |
|---|---|---|
| 1 | guardZoneName | const char* |
| 2 | entity | Entity |
| 3 | x | float |
| 4 | y | float |
| 5 | z | float |
Facts
| Name | _CREATE_GUARD_ZONE_FOR_ENTITY |
|---|---|
| Hash | 0x0D4B77E862475ED3 |
| Namespace | |
| Returns | BOOL |
| Game build | 1311 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x0D4B77E862475ED3, -- _CREATE_GUARD_ZONE_FOR_ENTITY
"text", -- const char* guardZoneName
PlayerPedId(), -- Entity entity
0.0, -- float x
0.0, -- float y
0.0 -- float z
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x0D4B77E862475ED3", // _CREATE_GUARD_ZONE_FOR_ENTITY
"text", // const char* guardZoneName
PlayerPedId(), // Entity entity
0.0, // float x
0.0, // float y
0.0, // float z
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x0D4B77E862475ED3, // _CREATE_GUARD_ZONE_FOR_ENTITY
"text", // const char* guardZoneName
API.PlayerPedId(), // Entity entity
0.0f, // float x
0.0f, // float y
0.0f // float z
);Related LAW natives
- _CREATE_GUARD_ZONE
- _CREATE_LAW_DISPATCH_RESPONSE_FOR_COORDS
- _DISABLE_GUARD_ZONE
- _REMOVE_GUARD_ZONE
- _SET_GUARD_ZONE_POSITION
- _SET_GUARD_ZONE_POSITION_2
- _SET_GUARD_ZONE_VOLUME_REGISTRATION_END
- _SET_GUARD_ZONE_VOLUME_REGISTRATION_START
- _SET_GUARD_ZONE_VOLUME_RESTRICTED
- _SET_GUARD_ZONE_VOLUME_THREAT
- _SET_GUARD_ZONE_VOLUME_WARNING
- _ARE_LAW_PEDS_ENABLED_FOR_TRAIN
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.