tw.blip
Side: Client
Module for creating map blips with automatic cleanup on resource stop.
Functions
tw.blip.create(locationOrEntity, name, sprite, blipHash?, color?)
Creates a map blip at coordinates or on an entity.
| Parameter | Type | Description |
|---|---|---|
locationOrEntity | vector3 or integer | World coordinates or entity handle |
name | string | Label displayed on the map |
sprite | string or integer | Sprite name or hash |
blipHash | integer? | Blip type hash (default: 1664425300) |
color | string? | Color modifier name |
Returns: integer (blip ID) or false if entity doesn't exist.
Examples
lua
-- Create a blip at coordinates
local blip = tw.blip.create(vec3(-301.62, 783.04, 117.75), "Valentine Store", "blip_shop")
-- Create a blip with custom color
local blip2 = tw.blip.create(vec3(2696.72, -1450.12, 45.26), "Doctor", "blip_shop_doctor", nil, "BLIP_MODIFIER_MP_COLOR_32")
-- Create a blip on an entity
local blip3 = tw.blip.create(myPed, "Target NPC", "blip_ambient_mission")Notes
- All blips are tracked internally and automatically removed when the resource stops.
- You do not need to manually clean up blips in
tw.stopped(). - If
locationOrEntityis an entity handle that does not exist, the function returnsfalse.

