Skip to content

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.

ParameterTypeDescription
locationOrEntityvector3 or integerWorld coordinates or entity handle
namestringLabel displayed on the map
spritestring or integerSprite name or hash
blipHashinteger?Blip type hash (default: 1664425300)
colorstring?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 locationOrEntity is an entity handle that does not exist, the function returns false.

Premium RedM Scripts — Multi-Framework