Garry's Mod

Garry's Mod

Not enough ratings
MapMaster — Staff Map Selector (Pro GUI & Search)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Fun, Roleplay, Realism
File Size
Posted
Updated
47.121 KB
Sep 3, 2025 @ 4:18pm
Nov 2, 2025 @ 1:56pm
2 Change Notes ( view )

Subscribe to download
MapMaster — Staff Map Selector (Pro GUI & Search)

Description
🗺️ MapMaster — Staff Map Selector

A modern Garry’s Mod addon that gives your staff a beautiful, easy-to-use menu to search, select, and change maps instantly—no server restart needed!




What is MapMaster?
MapMaster is a staff-only tool that lets trusted team members open a stylish menu, search or scroll through all installed maps, and safely change the map for everyone. It features real-time search, confirmation dialogs, and highlights the current map—making map changes fast, safe, and professional.




How to Use
    Open the menu with !mc (chat) or mc (console). Search or scroll to find your map. Click Change Map and confirm in the popup. The server will announce and switch maps after 3 seconds.




Who Can Use It?
Only these user groups (case-sensitive) can access MapMaster:
  • owner
  • Super Admin
  • Admin
  • Moderator
  • priv




Give your staff the power to manage maps quickly and safely with MapMaster!







Map Selector Pro — CHANGELOG

Version: Update (Nov 2, 2025)
This changelog summarizes all user-visible features, improvements, and bug fixes included in this update of Map Selector Pro.




Major improvements
  • Polished, consistent UI: Restyled interface to match a gold/dark "House of Poe" theme for clarity and visual consistency.
  • Clean headers: Removed redundant default DFrame title text and presented a single, clear header rendered by the addon.
  • Custom close controls: Replaced font-dependent close text with a robust X drawn using lines (no external font dependency).

New features
  • Sorting: Sort maps by Name, Recently Played, and Popularity.
  • Fuzzy search: Character-in-order fuzzy search to find maps quickly using partial inputs.
  • Favorites: Favorite/bookmark maps; favorites persist in the database and can be filtered.
  • Copy map name: Right-click context menu to copy a map's name to clipboard.
  • Keyboard navigation: Arrow Up/Down to move selection, Enter to confirm, Escape to close (with a small debounce for responsive control).
  • Confirmation countdown: 10-second confirmation dialog shown before map change; clearly displays remaining time.
  • Auto-change on countdown: When the countdown reaches 0, the addon automatically triggers the map change.

Server & persistence
  • SQLite integration: Uses GMod's built-in sqlite (sv.db) to persist map metadata (play counts, last-played timestamps, favorites).
  • Auto-init database: Automatically creates the map_selector_data table on first run; no manual DB setup required.
  • Data retention policy: Automatic cleanup keeps the database trimmed to the most recent 100 non-favorite maps while preserving all favorites.

Tracking & robustness
  • Global map change tracking: Added a Think hook to detect map changes from any source so recently played data is always accurate.
  • Improved SQL safety: Proper escaping and type handling when reading/writing SQLite to avoid injection and type errors.
  • Error handling: Defensive checks in Paint functions and UI code to prevent nil/zero arithmetic and runtime crashes.

Compatibility & permissions
  • Gamemode-agnostic: Works on any GMod server; only uses standard APIs (vgui, net, sql, hooks).
  • Configurable permission groups: Server owners can edit allowed groups in lua/autorun/server/sv_mapselector.lua.
  • Commands: Chat !mc or console mc to open the selector (permission-checked).

Bug fixes & UI polish
  • Fixed missing font crashes (removed reliance on non-guaranteed fonts like DermaSmall / DefaultFont).
  • Replaced text-based close buttons with line-drawn X icons.
  • Removed duplicate/overlapping title text; custom header is now single source of truth.
  • Fixed Paint arithmetic crashes by validating width/height before calculations.

Developer notes (short)
  • Client UI: lua/autorun/client/cl_mapselector.lua
  • Server DB and handlers: lua/autorun/server/sv_mapselector.lua
  • Database table: map_selector_data (map_name, play_count, last_played, is_favorite) is created automatically.

How this affects server owners
  • No manual DB operations required: the addon creates/migrates its table automatically.
  • If you use different admin group names, update the ALLOWED_GROUPS table in the server script.
  • All UI tweaks are cosmetic and safe; the addon remains compatible with other addons and gamemodes.