DocsSettings (
View product page
X3D Map Events
Free event panel on the pause-menu map: name + countdown, click to set a waypoint. Other scripts push events like notifications; admins can create their own.
Buy / Get freeConfig builderInstallation
- Put the
x3d_mapeventsfolder inresources/ - Add to
server.cfgbefore any script that sends events:
ensure x3d_mapevents
No database, nothing else to install. Open the pause menu while an event is live and the panel shows bottom-left.
Settings (config.lua)
| Key | Default | What it does |
|---|---|---|
Config.Locale |
'th' |
Language 'th' / 'en' |
Config.MaxRows |
5 |
Most rows, soonest-ending first |
Config.HotSeconds |
300 |
Under this many seconds the timer turns red |
Config.Position |
{ left = 28, bottom = 175 } |
Offset from the bottom-left (pixels of a 1080-high screen); the default sits above the map's scale bar |
Config.Scale |
0.75 |
Panel size |
Config.Clickable |
true |
Click a row to set / clear the waypoint (the map still pans and zooms). false = read-only panel, navigate through the game's blip list |
Config.Blip |
{ sprite = 38, colour = 5, scale = 0.9, shortRange = false, flash = false } |
Default blip for events with a spot |
Config.WaypointRadius |
75.0 |
A waypoint within this many metres marks the row as navigated |
Config.AdminSave |
true |
Admin-made events survive a restart |
Config.MaxDuration |
7 days | Longest allowed event (typo guard) |
Config.Debug |
false |
true = /mapevents_test adds sample events for you only |
Sending events from other scripts
-- server: everyone sees it (late joiners too)
exports.x3d_mapevents:Add({
id = 'my_event', -- same id = replace
title = { th = 'ผู้รับซื้อรายใหญ่', en = 'Big Buyer' }, -- or a single string
sub = { th = 'ปิดใน', en = 'Closes in' }, -- second line (optional)
icon = 'drug', -- star flag crown fire money market car drug alert clock, or an image URL
color = 'amber', -- amber red violet green blue
duration = 15 * 60, -- seconds, or endsAt = unix time instead
coords = vector3(x, y, z), -- leave out = name and timer only
blip = false, -- false = no blip (the source script has one) or { sprite, colour, scale, flash }
})
exports.x3d_mapevents:Remove('my_event')
exports.x3d_mapevents:Has('my_event')
-- client: this player only (e.g. a job cooldown)
exports.x3d_mapevents:AddLocal({ id = 'cooldown', title = 'Work again', duration = 300 })
exports.x3d_mapevents:RemoveLocal('cooldown')
Finished events disappear from the panel and the map on their own. If this resource restarts, events sent by other scripts are gone (admin events stay).
X3D admin panel (optional)
With x3d_adminpanel on the server you get a "Map events" menu: see live events, create one (Thai/English name, minutes, use where you stand, icon), extend +10 min and delete.
X3D Selldrug
X3D Selldrug 1.2.4+ sends its big-buyer event through Hooks.OnEventBuyer (in its addons/hooks/server.lua) with no setup.
Troubleshooting
| Symptom | Fix |
|---|---|
| Thai blip names show boxes | The bundled stream/font4thai.gfx must load; do not delete the stream folder |
| The panel covers another pause tab | The panel shows on every pause tab; move it with Config.Position |
| Timers are off | Times follow the server clock (unix time); keep the server clock correct |