Exports & Commands
All exports are client-side. There is no server script, so calling them from a server resource does nothing โ trigger a client event of your own and call the export there.
The Lua files carry LuaLS annotations, so an editor with the Lua Language Server shows these signatures inline.
Minimap
| Export | Signature | Effect |
|---|---|---|
ShowMinimap | () | shows the radar, animated |
HideMinimap | () | hides the radar, animated |
ToggleMinimap | () | flips the current state |
SetMinimapShown | (on: boolean) | sets the state explicitly |
IsMinimapShown | (): boolean | the requested state โ true as soon as the animation starts, not when it ends |
-- hide the radar while a cutscene plays
exports.enhanced_map:HideMinimap()
-- ... later
exports.enhanced_map:ShowMinimap()
if not exports.enhanced_map:IsMinimapShown() then
exports.enhanced_map:SetMinimapShown(true)
end
Map theme
| Export | Signature | Effect |
|---|---|---|
SetMapTheme | (name: 'light'|'dark') | switches the map image; anything but 'dark' means 'light' |
ToggleMapTheme | () | flips between the two |
GetMapTheme | (): 'light'|'dark'|nil | the active palette, nil before the first one is applied |
The switch takes effect immediately, on the pause map and on the radar, without a reconnect.
exports.enhanced_map:SetMapTheme('dark')
-- follow the in-game clock
CreateThread(function()
while true do
local h = GetClockHours()
exports.enhanced_map:SetMapTheme((h >= 20 or h < 6) and 'dark' or 'light')
Wait(60000)
end
end)
Pause map
| Export | Signature | Effect |
|---|---|---|
OpenMap | () | opens the pause menu on the map page |
CloseMap | () | closes the pause menu |
Search
| Export | Signature | Effect |
|---|---|---|
SetSearch | (term: string?) | sets the search term; nil or '' clears it |
GetSearch | (): string | the current term |
Surrounding whitespace is trimmed. Matching is a case-insensitive substring match on the entry label, and the list and the map always agree: entries that do not match lose their row and their blip, and a category with no matches disappears with its header.
exports.enhanced_map:SetSearch('garage')
print(exports.enhanced_map:GetSearch()) -- garage
exports.enhanced_map:SetSearch(nil) -- clear
Blip visibility
| Export | Signature | Effect |
|---|---|---|
ToggleBlip | (label: string) | shows or hides the entry with this label โ the same as its checkbox |
SetSearchFocus | (on: boolean) | draws the search field focused; used internally when the player clicks it |
The label is matched exactly, so a label shared by several locations toggles all of them at once. The row stays in the list with a crossed-out icon and greyed text.
exports.enhanced_map:ToggleBlip('Police Department')
Timing
The blips are created once the session has started. Exports called before that still work,
but a SetSearch or ToggleBlip fired at resource start has nothing to apply to yet โ
call them after the player is loaded.
Commands
| Command | Effect |
|---|---|
/mapui | opens the pause menu on the map page |
/mapui close | closes it |
/mapui search <term> | sets the search term |
/maptheme | toggles light / dark |
/maptheme dark, /maptheme light | switches to that palette |
/minimap | toggles the radar |
All commands are unrestricted. To take one away, ACE-restrict it in your server.cfg.
Key bindings
/minimap is registered as a key mapping with the default key Z, so players can rebind
it under Settings โ Key Bindings โ FiveM.
On the open map page:
| Input | Effect |
|---|---|
| Click on a row | selects it, the map jumps to the blip |
| Arrow keys, Enter | selection, stepping through a group, setting a waypoint |
| Click on the checkbox | shows / hides that entry's blips |
T | the same, for the selected row |
| Click into the search field | focus, then type โ Enter, Escape or a click elsewhere ends the input |
| Drag the scrollbar handle, click the track | scrolls the list, the map stays put |
M | closes the map |
The search field takes letters, digits, space, - and ., up to 40 characters. While you
are typing, the menu's own shortcuts are held back so Q and E do not switch tabs and
Enter does not set a waypoint.