TasksClient

addCoverPoint

ADD_COVER_POINT0xD5C12A75C7B9497F

The GTA V native ADD_COVER_POINT of the TASK namespace, as LS:MP client scripts call it: the global function addCoverPoint, in JavaScript and in Lua.

SignatureJavaScript
addCoverPoint(
  x: number,
  y: number,
  z: number,
  direction: number,
  usage: number,
  height: number,
  arc: number,
  isPriority: boolean
): ScrHandle
SignatureLua
addCoverPoint(
  x: number,
  y: number,
  z: number,
  direction: number,
  usage: integer,
  height: integer,
  arc: integer,
  isPriority: boolean
): ScrHandle

Usage

JavaScript
const handle = addCoverPoint(x, y, z, direction, usage, height, arc, isPriority);
Lua
local handle = addCoverPoint(x, y, z, direction, usage, height, arc, isPriority)

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 handle = addCoverPoint(pos, direction, usage, height, arc, isPriority);
Lua · with vectors
local handle = addCoverPoint(pos, direction, usage, height, arc, isPriority)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
directionfloatnumbernumber
usageintnumberinteger
heightintnumberinteger
arcintnumberinteger
isPriorityBOOLbooleanboolean

Returns

ScrHandle JavaScript number, Lua integer

An opaque handle the game hands out. Pass it back unchanged.

Reference

Namespace
Tasks TASK
In the game
ScrHandle ADD_COVER_POINT(float x, float y, float z, float direction, int usage, int height, int arc, BOOL isPriority)
Hash
0xD5C12A75C7B9497F

Open in the interactive natives reference