Skip to content

Installation ​

1. Add the resource ​

Copy the folder into your resources directory. Keep it named exactly MG-payload. The tablet item export depends on that name.

2. Import the database ​

Import one file from install/SQL/ that matches your framework:

FrameworkFile
Qboxqbx.sql
QBCoreqbcore.sql
ESXesx.sql
vRP 1vrp1.sql
vRP 2vrp2.sql

It creates the mg_payload_* tables for seasons, players, matches and rewards.

INFO

The database is needed for stats, ranked, the leaderboard and rewards. Without it, matches still run but nothing is saved.

3. Add the tablet item (optional) ​

Players can open the menu with /payload. If you also want a tablet item:

lua
-- ox_inventory/data/items.lua
['paytab'] = {
    label = 'Payload Tablet',
    description = 'Open Payload matchmaking.',
    weight = 500,
    stack = false,
    close = true,
    consume = 0,
    client = { image = 'paytab.png' },
    server = { export = 'MG-payload.UseOxPayloadTablet' }
},
lua
-- qb-core/shared/items.lua
['paytab'] = {
    name = 'paytab',
    label = 'Payload Tablet',
    weight = 500,
    type = 'item',
    image = 'paytab.png',
    unique = true,
    useable = true,
    shouldClose = true,
    description = 'Open Payload matchmaking.'
},

Copy install/images/paytab.png into your inventory's image folder. vRP item files are in install/vrp1.lua and install/vrp2.lua.

Then set the item options in config.lua:

lua
Config.MenuItem = {
    Enabled = true,
    Name = 'paytab',
    RequireForMenu = false,   -- true = /payload only works while holding the tablet
    RegisterUsableItem = false,
    AllowCommand = true
}

4. Set admins ​

Add the Discord IDs of your staff to Config.Admins in config.lua:

lua
Config.Admins = {
    'discord:123456789012345678',
}

Only these players can use the admin commands and the route editor.

5. Start order ​

ini
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory

ensure MG-payload

Make sure OneSync is enabled on your server.

6. Test it ​

  1. Restart the server.
  2. Run /payload to open the menu.
  3. As an admin, run /payloadtest to start a test round on your own.

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