MiscClient

addDispatchSpawnAngledBlockingArea

ADD_DISPATCH_SPAWN_ANGLED_BLOCKING_AREA0x918C7B2D2FF3928B

The GTA V native ADD_DISPATCH_SPAWN_ANGLED_BLOCKING_AREA of the MISC namespace, as LS:MP client scripts call it: the global function addDispatchSpawnAngledBlockingArea, in JavaScript and in Lua.

SignatureJavaScript
addDispatchSpawnAngledBlockingArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number
): number
SignatureLua
addDispatchSpawnAngledBlockingArea(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  width: number
): integer

Usage

JavaScript
const result = addDispatchSpawnAngledBlockingArea(x1, y1, z1, x2, y2, z2, width);
Lua
local result = addDispatchSpawnAngledBlockingArea(x1, y1, z1, x2, y2, z2, width)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const result = addDispatchSpawnAngledBlockingArea(pos1, pos2, width);
Lua · with vectors
local result = addDispatchSpawnAngledBlockingArea(pos1, pos2, width)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
widthfloatnumbernumber

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

To remove, see: removeDispatchSpawnBlockingArea
See isPointInAngledArea for the definition of an angled area.

Reference

Namespace
Misc MISC
In the game
int ADD_DISPATCH_SPAWN_ANGLED_BLOCKING_AREA(float x1, float y1, float z1, float x2, float y2, float z2, float width)
Hash
0x918C7B2D2FF3928B
Formerly
_ADD_DISPATCH_SPAWN_BLOCKING_ANGLED_AREA

Open in the interactive natives reference