Configuration
Gameplay settings are in config.lua. Restart the resource after any change.
General
| Option | Default | Description |
|---|---|---|
Config.Locale | 'en' | 'en' or 'ar'. |
Config.ServerColore | '#ff004c' | Main UI color. |
Config.Debug | false | Prints debug output. |
Config.AllowMultipleMatches | true | Allow several matches at the same time. |
Config.MaximumConcurrentMatches | 0 | Max matches at once. 0 = no limit. |
Systems
Every integration is set to 'auto'. Change one only if detection picks the wrong resource.
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
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
| Option | Default | Description |
|---|---|---|
MinimumTeamPlayers | 3 | Players needed per team. |
MaximumTeamPlayers | 6 | Max players per team. |
RoundDuration | 450 | Starting round time in seconds. |
CheckpointAddedTime | 240 | Seconds added when a checkpoint is reached. |
PreparationDuration | 5 | Countdown before the round starts. |
OvertimeEnabled | true | Enables overtime at the end of the round. |
BalanceTeams | true | Auto-balance teams. |
AllowLateJoin | false | Allow joining after the match started. |
FriendlyFire | false | Damage to teammates. |
RestorePlayerState | true | Returns players to their state from before the match. |
EndOnInsufficientPlayers | true | End the match if a team drops below the minimum. |
Respawn
Config.Respawn = {
Delay = 10,
SpawnProtectionDuration = 7,
Health = 200,
Armor = 50
}Teams
Colors and names of the two teams:
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:
Config.Weapons = {
WEAPON_PISTOL_MK2 = { label = 'Pistol Mk II', icon = 'pistol', damageCredit = 32 },
WEAPON_HEAVYPISTOL = { label = 'Heavy Pistol', icon = 'pistol', damageCredit = 40 },
}Rewards
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
Config.Ranked = {
Enabled = true,
StartingRating = 1000,
LeavePenalty = 25,
Rating = {
PerKill = 5,
Win = 40,
MVP = 15,
Loss = -75
},
}| Tier | Rating |
|---|---|
| Bronze | 1,000 |
| Silver | 3,500 |
| Gold | 5,000 |
| Platinum | 7,500 |
| Diamond | 9,000 |
| Master | 11,500 |
| Grandmaster | 15,000 |
Private matches
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:
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:
| Event | When |
|---|---|
mg-payload:server:matchCreated | A match lobby is created. |
mg-payload:server:matchStarted | A round starts. |
mg-payload:server:matchEnded | A match ends. |
mg-payload:server:checkpointReached | The payload reaches a checkpoint. |
Event names can be changed in Config.IntegrationHooks.
