- Katılım
- 4 yıl 3 ay 18 gün
- Mesajlar
- 114

dms-blips is a lightweight blip manager script that acts like a framework for organizing and managing all your blips in one centralized system.

- Centralized blip management
- Easily show/hide blip categories
- Automatic category grouping
- Set nearest blip as GPS waypoint
- Easy to integrate with any script
Make sure to `ensure dms-blips` before any other script that uses it in your server.cfg.

1. `AddBlip(category, data)`
Add a new blip to the map under a specific category.
exports["dms-blips"]:AddBlip(category, data)
- `category`: Blip category name (e.g., `"Markets"`)
- `data`: Blip data object containing:
- `location`: `vec2(x, y)`
- `title`: Blip label
- `sprite`: Blip icon
- `colour`: Blip color
- `scale`: Blip size

example_script/config.lua
Config = {}
Config.Value = {
{ text = "Market 1", colour = 4, sprite = 289, scale = 0.65, x = 0, y = 0 },
{ text = "Market 2", colour = 4, sprite = 289, scale = 0.65, x = 0, y = 0 },
}
example_script/client.lua
Citizen.CreateThread(function()
for k, v in pairs(Config.Value) do
exports["dms-blips"]:AddBlip("Markets", {
location = vec2(v.x, v.y),
title = v.text,
colour = v.colour,
sprite = v.sprite,
scale = v.scale
})
end
end)
2. `ToggleBlips(category, visible)`
Show or hide a specific category of blips.
exports["dms-blips"]:ToggleBlips("Markets", true) -- true = show / false = hide
3. `GetBlipCategories()`
Returns a list (table) of all registered blip categories.
local categories = exports["dms-blips"]:GetBlipCategories()
4. `SetNearestWaypoint(category)`
Automatically sets a GPS waypoint to the nearest blip in the given category.
exports["dms-blips"]:SetNearestWaypoint("Markets")


Linkleri,görmek için
Giriş yap veya üye ol.


Linkleri,görmek için
Giriş yap veya üye ol.
