Skip to content

Configuration ​

Gameplay settings are in config.lua. Restart the resource after any change.

General ​

OptionDefaultDescription
Config.Locale'en''en' or 'ar'.
Config.ServerColore'#ff004c'Main UI color.
Config.DebugfalsePrints debug output.
Config.AllowMultipleMatchestrueAllow several matches at the same time.
Config.MaximumConcurrentMatches0Max matches at once. 0 = no limit.

Systems ​

Every integration is set to 'auto'. Change one only if detection picks the wrong resource.

lua
Config.Framework = 'auto'   -- qbx / qb / esx / vrp
Config.Inventory = 'auto'
Config.Target    = 'auto'
Config.Notify    = 'auto'
Config.Medical   = 'auto'
Config.Voice     = 'auto'
-- ...
Config.VRP = { Resource = 'vrp', Version = 'auto' }

Queue ​

lua
Config.Queue = {
    Enabled = true,
    AllowedTypes = { solo = true, teams = true },
    DefaultType = 'solo',
    Solo = {
        MinimumPlayers = 6,   -- players needed before a solo match starts
        LaunchCountdown = 30
    },
    Teams = {
        MinimumPartySize = 3
    },
}

Config.Party = {
    Enabled = true,
    MaximumSize = 6,
    InviteTimeoutSeconds = 30
}

Match ​

OptionDefaultDescription
MinimumTeamPlayers3Players needed per team.
MaximumTeamPlayers6Max players per team.
RoundDuration450Starting round time in seconds.
CheckpointAddedTime240Seconds added when a checkpoint is reached.
PreparationDuration5Countdown before the round starts.
OvertimeEnabledtrueEnables overtime at the end of the round.
BalanceTeamstrueAuto-balance teams.
AllowLateJoinfalseAllow joining after the match started.
FriendlyFirefalseDamage to teammates.
RestorePlayerStatetrueReturns players to their state from before the match.
EndOnInsufficientPlayerstrueEnd the match if a team drops below the minimum.

Respawn ​

lua
Config.Respawn = {
    Delay = 10,
    SpawnProtectionDuration = 7,
    Health = 200,
    Armor = 50
}

Teams ​

Colors and names of the two teams:

lua
Config.Teams = {
    Attackers = { Color = '#ff2600', ... },
    Defenders = { Color = '#0c7ae2', ... },
}

Weapons ​

Weapons listed in Config.Weapons get a proper name and icon in the kill feed, and a damage value used for assists. Add your custom weapons here:

lua
Config.Weapons = {
    WEAPON_PISTOL_MK2 = { label = 'Pistol Mk II', icon = 'pistol', damageCredit = 32 },
    WEAPON_HEAVYPISTOL = { label = 'Heavy Pistol', icon = 'pistol', damageCredit = 40 },
}

Rewards ​

lua
Config.KillReward = {
    Enabled = true,
    Item = 'pistol_ammo',
    Amount = 10,
}

Config.Rewards = {
    Enabled = true,
    Winner = {
        money = { account = 'bank', amount = 5000 },
        items = {
            { item_name = 'weapon_pistol_mk2', min = 0,   max = 1,   luckChance = 25 },
            { item_name = 'pistol_ammo',       min = 100, max = 150, luckChance = 50 }
        }
    },
    Loser = { money = { account = 'bank', amount = 1500 }, items = { ... } },
    MVP   = { money = { account = 'bank', amount = 1500 }, items = {} },
    MaximumMoney = 25000,
}

luckChance is the percentage chance to receive that item. Every item must exist in your inventory.

Ranked ​

lua
Config.Ranked = {
    Enabled = true,
    StartingRating = 1000,
    LeavePenalty = 25,
    Rating = {
        PerKill = 5,
        Win = 40,
        MVP = 15,
        Loss = -75
    },
}
TierRating
Bronze1,000
Silver3,500
Gold5,000
Platinum7,500
Diamond9,000
Master11,500
Grandmaster15,000

Private matches ​

lua
Config.PrivateMatches = {
    Enabled = false,
    AllowRewards = false,
    AllowRanked = false
}

When enabled, admins can create password-protected matches with /payloadprivate.

Discord logs ​

Webhooks are in the server-only file server.lua:

lua
ServerConfig.Webhooks = {
    Default  = 'https://discord.com/api/webhooks/...',
    Matches  = '',
    Security = '',
    Admin    = '',
    Rewards  = '',
    Database = ''
}

ServerConfig.Discord = {
    Enabled = true,
    BotName = 'MG Payload',
}

Set Enabled = true to turn logging on. Empty categories fall back to Default.

Server events ​

MG-Payload fires these server events, so your other scripts can react to matches:

EventWhen
mg-payload:server:matchCreatedA match lobby is created.
mg-payload:server:matchStartedA round starts.
mg-payload:server:matchEndedA match ends.
mg-payload:server:checkpointReachedThe payload reaches a checkpoint.

Event names can be changed in Config.IntegrationHooks.

All MG Development resources are protected. Redistribution is not permitted.