Configuration

4 min readUpdated 2 weeks ago

Overview

Config is split across three files:

  • shared/config.lua: General settings, stash, dispatch, money cap, anti-exploit
  • shared/config_minigames.lua: Minigame integrations
  • server/config_server.lua: ml_skills integration and Discord webhook URLs

Prop-level settings (loot tables, tools, cooldowns, weapon rules) are managed through the admin panel and stored in the database.

General

shared/config.lua
1Config.Language = 'en'
2Config.Theme = 'default'
3Config.Debug = false
4Config.Interaction = nil
5Config.Command = 'mllootprops'
6Config.MaxMoneyPerClaim = 50000
  • Language: Language code for translations
  • Theme: Admin UI theme. Options: 'default', 'wasteland', 'cyberpunk', 'noir', 'fantasy'
  • Debug: Enables verbose console output
  • Interaction: Interaction method. nil = auto-detect (target system if available, otherwise TextUI), 'target' = force target, 'textui' = force TextUI
  • Command: Chat command to open the admin panel (requires admin permissions)
  • MaxMoneyPerClaim: Maximum money reward per single loot claim (safety cap)

Stash

When a prop is set to "Loot Box" mode in the admin panel, it opens an ox_inventory stash instead of giving items directly.

shared/config.lua
1Config.Stash = {
2    Prefix = 'ml_proploot',
3    DefaultLabel = 'Loot',
4    Slots = 20,
5    MaxWeight = 50000,
6}
  • Prefix: Stash ID prefix used in the inventory system
  • DefaultLabel: Display label for the stash UI
  • Slots: Number of inventory slots in the stash
  • MaxWeight: Maximum weight in grams (50000 = 50kg)
shared/config.lua
1Config.AbandonedStashSeconds = 600
  • AbandonedStashSeconds: Seconds a loot box stash can sit idle before it is cleared and the prop marked collected. 0 disables the check

Dispatch

Police notifications when players loot props. Props and categories can override these defaults from the admin panel.

shared/config.lua
1Config.Dispatch = {
2    Enabled = true,
3    DefaultCooldown = 180,
4    DefaultChance = 50,
5    Jobs = { 'police', 'sheriff' },
6    BlipSprite = 161,
7    BlipColor = 1,
8    BlipFlash = true,
9    DefaultMessage = 'Suspicious Activity',
10}
  • Enabled: Enable/disable dispatch alerts globally
  • DefaultCooldown: Seconds between alerts for the same prop location
  • DefaultChance: Probability (0-100) of triggering per loot action
  • Jobs: Job names that receive dispatch alerts
  • BlipSprite: Map blip sprite ID
  • BlipColor: Map blip color ID
  • BlipFlash: Flash the blip on the map
  • DefaultMessage: Default dispatch message text

Anti-Exploit

shared/config.lua
1Config.StrictKillWeapon = true
2Config.MinSharedCooldown = 30
  • StrictKillWeapon: When a prop requires a specific kill weapon, the server reads the victim ped's cause of death server-side instead of trusting the client. Blocks forged death-weapon claims. Set to false only for legacy clients that cannot be updated, the server then trusts the client and logs every fallback as an exploit warning
  • MinSharedCooldown: Anti-duplication floor in seconds. A prop with no globalCooldown, neverRegenerate or deleteOnLoot still gets a shared lock for this long after a claim, so two players racing the same prop cannot both roll fresh loot. 0 disables it (not recommended)

Minigames

Defined in shared/config_minigames.lua. Selected per-prop or per-category in the admin panel.

Supported minigame resources:

shared/config_minigames.lua
1Config.AvailableMiniGames["my_custom_game"] = {
2    label = "My Custom Game",
3    Start = function(params)
4        local success = exports['my-minigames']:StartGame('hard')
5        return success
6    end
7}

The Start function must return true (pass) or false (fail).

ml_skills Integration

XP rewards and skill requirements are assigned to individual props in the admin panel. This block controls the integration globally.

server/config_server.lua
1Config.Skills = {
2    Enabled      = true,
3    Resource     = 'ml_skills',
4    MaxXpPerLoot = 500,
5}
  • Enabled: Master switch. false disables both XP rewards and skill-requirement gating
  • Resource: Name of the skills resource. Rarely changes
  • MaxXpPerLoot: Server-side cap on XP granted per loot, applied on top of the per-prop value as an anti-exploit limit
Optional Dependency

ml_skills is not required. When it is not running, looting works normally, no XP is awarded, and skill requirements are ignored.

Discord Webhooks

server/config_server.lua
1Config.DiscordWebhook = {
2    PropConfigSave   = 'INSERT_WEBHOOK_LINK_HERE',
3    PropConfigDelete = 'INSERT_WEBHOOK_LINK_HERE',
4    SettingsChange   = 'INSERT_WEBHOOK_LINK_HERE',
5    LootCollect      = 'INSERT_WEBHOOK_LINK_HERE',
6    ToolUse          = 'INSERT_WEBHOOK_LINK_HERE',
7    ExploitDetected  = 'INSERT_WEBHOOK_LINK_HERE',
8}

Replace each placeholder with a Discord webhook URL. Set to false to disable that log entirely.

server/config_server.lua
1ExploitDetected = false,   -- disabled, no log sent
  • PropConfigSave / PropConfigDelete: Admin creates, edits or removes a prop
  • SettingsChange: Admin changes global settings
  • LootCollect: Player loots a prop
  • ToolUse: Tool durability consumed
  • ExploitDetected: Distance bypass or invalid input