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:
| Framework | File |
|---|---|
| Qbox | qbx.sql |
| QBCore | qbcore.sql |
| ESX | esx.sql |
| vRP 1 | vrp1.sql |
| vRP 2 | vrp2.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:
-- 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' }
},-- 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:
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:
Config.Admins = {
'discord:123456789012345678',
}Only these players can use the admin commands and the route editor.
5. Start order
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure MG-payloadMake sure OneSync is enabled on your server.
6. Test it
- Restart the server.
- Run
/payloadto open the menu. - As an admin, run
/payloadtestto start a test round on your own.
