RedM Natives

_ADD_BLIP_FOR_AREA

Adds a rectangular blip for the specified coordinates/area.

Hash0x6228F159
Runtime nameAddBlipForArea
NamespaceCFX
SideServer
NameOfficial
Docs
Also known as0xCE5D0E5E315DB238

Signature

Blip _ADD_BLIP_FOR_AREA(float x, float y, float z, float width, float height);

Parameters

NameTypeDescription
xfloat

The X coordinate of the center of the blip.

yfloat

The Y coordinate of the center of the blip.

zfloat

The Z coordinate of the center of the blip.

widthfloat

The width of the blip.

heightfloat

The height of the blip.

Returns Blip — A handle to the blip.

Description

Cfx.re native reference

Adds a rectangular blip for the specified coordinates/area. It is recommended to use SET_BLIP_ROTATION and SET_BLIP_COLOUR to make the blip not rotate along with the camera. By default, the blip will show as a regular blip with the specified color/sprite if it is outside of the minimap view. (Native name is likely to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed)

This is the server-side RPC native equivalent of the client native _ADD_BLIP_FOR_AREA.

Usage

Lua
local retval = AddBlipForArea(x, y, z, width, height)

-- always works, by hash
local retval = Citizen.InvokeNative(0x6228f159, x, y, z, width, height, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = AddBlipForArea(x, y, z, width, height);

// by hash
const retval = Citizen.invokeNative('0x6228f159', x + 0.0000001, y + 0.0000001, z + 0.0000001, width + 0.0000001, height + 0.0000001, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0x6228f159, x, y, z, width, height);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.