ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. createRadarArea

Function

createRadarArea

Creates a rectangular radar area (e.g. a gang turf) in an RGBA colour. The area exists on the server: it has a colour, a size, flashing and isInsideRadarArea, but the current client version does not draw it on the radar yet.

Syntax

radararea createRadarArea(float startPosX, float startPosY, float sizeX, float sizeY [, int r = 255, int g = 0, int b = 0, int a = 150])

Arguments

startPosXfloat
X of the bottom-left corner.
startPosYfloat
Y of the bottom-left corner.
sizeXfloat
Width.
sizeYfloat
Height.
rint, optional = 255
Red.
gint, optional = 0
Green.
bint, optional = 0
Blue.
aint, optional = 150
Opacity.

Differences from MTA:SA

  • These MTA:SA arguments are not here: element visibleTo = root

In MTA:SA

createRadarArea(float startPosX, float startPosY, float sizeX, float sizeY, int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = root)

Returns

The area or false.

Example

local turf = createRadarArea(2440, -1720, 120, 90, 30, 160, 60, 140)

See also