_ADD_BLIP_FOR_AREA
Adds a rectangular blip for the specified coordinates/area.
0x6228F159AddBlipForArea0xCE5D0E5E315DB238Signature
Blip _ADD_BLIP_FOR_AREA(float x, float y, float z, float width, float height);Parameters
| Name | Type | Description |
|---|---|---|
x | float | The X coordinate of the center of the blip. |
y | float | The Y coordinate of the center of the blip. |
z | float | The Z coordinate of the center of the blip. |
width | float | The width of the blip. |
height | float | The height of the blip. |
Returns Blip — A handle to the blip.
Description
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
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#
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());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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.