Configuration & Settings
Mountain Mods resources utilize structured, well-commented config.lua files designed for maximum flexibility. Every script is architected to work out-of-the-box using intelligent auto-detection while granting server owners full granular control over every gameplay mechanic, permission rank, and notification system.
Global Configuration Architecture
Section titled “Global Configuration Architecture”Every Mountain Mods script follows a unified configuration hierarchy:
Config = {}
-- ============================================================================-- 1. FRAMEWORK & SYSTEM BRIDGES-- ============================================================================-- Framework adapter: "auto", "qbcore", "esx", "qbx", "vrp", "ox", "standalone"Config.Framework = "auto"
-- Notification adapter: "auto", "ox_lib", "okokNotify", "qbcore", "esx", "standalone"Config.NotifySystem = "auto"
-- Dispatch adapter (for emergency/law enforcement scripts):-- "auto", "ps-dispatch", "qs-dispatch", "cd_dispatch", "core_dispatch", "rcore_dispatch", "lb-tablet", "none"Config.DispatchSystem = "auto"
-- Target interaction engine: "ox_target", "qb-target", "textui", "3dme", "drawtext"Config.Target = "ox_target"
-- ============================================================================-- 2. LOCALIZATION & DISPLAY-- ============================================================================-- Interface language: "en" (English), "nl" (Dutch), "de" (German), "fr" (French)Config.Language = "en"
-- Speed measurement standard: "kmh" (KM/H) or "mph" (MPH)Config.SpeedUnit = "kmh"
-- Currency symbol prefix/suffixConfig.Currency = "$"How Automatic Detection Works ("auto")
Section titled “How Automatic Detection Works ("auto")”When bridges are set to "auto", the resource executes safety-wrapped checks (GetResourceState() and pcall) during boot to automatically detect your server stack:
- Framework Identification: Automatically identifies whether your server is running
qb-core,qbx_core,es_extended,vrp, orox_core. If none of these are detected, it falls back seamlessly to Standalone Mode. - Dispatch System Detection: Detects if resources like
ps-dispatch,qs-dispatch,cd_dispatch, orlb-tabletare active, automatically formatting call alerts without requiring manual code edits. - Postal Code Resolvers: Checks for
nearest-postal,postals,qb-postals,esx_postals, orcd_postalsto dynamically attach street postcodes to all notifications. - Garage & Impound Resolvers: Automatically interfaces with
qs-garages,okokGarage,jg-advancedgarages, orcd_garagefor vehicle state lookups.
Custom Resource Name Overrides
Section titled “Custom Resource Name Overrides”If your server uses non-standard or renamed folder names (e.g. my-custom-dispatch or new_postals), you can override automatic detection via Config.CustomResourceNames:
Config.CustomResourceNames = { Postal = "auto", -- e.g. "my-postals-script" Dispatch = "auto", -- e.g. "custom-dispatch" Inventory = "auto", -- e.g. "ox_inventory" or "qb-inventory" MDT = "auto", -- e.g. "wasabi_mdt" or "sonorancad" Garage = "auto", -- e.g. "qs-garages" or "jg-advancedgarages" FakePlate = "auto", -- e.g. "brazzers-fakeplates" or "cw-plateswap" Insurance = "auto" -- e.g. "m-insurance"}Permissions: Job Checks vs Standalone ACE Permissions
Section titled “Permissions: Job Checks vs Standalone ACE Permissions”Mountain Mods provides flexible permission models for both framework-based and standalone servers:
When running with a framework (QBCore, ESX, QBox, vRP):
Config.UseJobCheck = trueConfig.AllowedJobs = { "police", "sheriff", "trooper", "kmar" }
-- Specify minimum grade requirements if applicable (0 = all grades)Config.MinimumGrade = 0When running in Standalone mode or using server-level ACE access:
Config.UseJobCheck = falseConfig.AdminAcePermission = "mountainmods.admin"In your server.cfg, grant permissions to specific player identifiers, Discord roles, or admin groups:
add_ace group.admin "mountainmods.admin" allowadd_principal identifier.license:1234567890abcdef group.adminTo allow staff members to bypass job checks and manage admin menus:
Config.AdminRoles = { "admin", "god", "superadmin", "owner", "*" }Localization & Multi-Language Translation
Section titled “Localization & Multi-Language Translation”All user-facing texts, notifications, tablet labels, and prompts are fully localized:
- Pre-Built Locales: Most resources include built-in translations for English (
"en") and Dutch ("nl"). - Adding Custom Translations:
- Locate the
locales/directory inside the resource folder. - Create a copy of
locales/en.jsonand rename it to your language code (e.g.locales/de.jsonorlocales/fr.json). - Translate the string values.
- Update
Config.Language = "de"inconfig.lua.
- Locate the
{ "interact_prompt": "Press [E] to interact", "action_success": "Operation completed successfully.", "insufficient_funds": "You do not have enough funds ($%s required).", "no_permission": "You do not have permission to use this system.", "item_received": "Received %sx %s."}