The Lab
LAW native

_CREATE_GUARD_ZONE_FOR_ENTITY

returns BOOL5 paramsbuild 1311

Creates a guard zone named guardZoneName around entity at the given coordinates, returning true on success.

Signature

C
BOOL _CREATE_GUARD_ZONE_FOR_ENTITY(const char* guardZoneName, Entity entity, float x, float y, float z); // 0x0D4B77E862475ED3 b1311

Parameters

#NameType
1guardZoneNameconst char*
2entityEntity
3xfloat
4yfloat
5zfloat

Facts

Facts about _CREATE_GUARD_ZONE_FOR_ENTITY
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.

Lua
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
JavaScript
// 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) {
  // ...
}
C#
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
);
All LAW natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.