Skip to content

Installation ​

Requirements ​

ResourceRequired
oxmysqlYes
qbx_core or qb-coreYes
ox_inventory or qb-inventoryYes
interact, ox_target or qb-targetYes (one of them)
ox_libOptional, for ox_lib notifications
lb-phone, npwd or qb-phoneOptional, for phone notifications
A medical resourceOptional, see Medical

Escrow

MG-Contest is encrypted with Cfx.re Escrow. To run it:

  • Download it from the Cfx.re Portal with the account that bought it.
  • Your server's license key (sv_licenseKey) must belong to that same Cfx.re account.
  • Use up-to-date server artifacts.

1. Add the resource ​

Copy the folder into your server's resources directory. The folder must be named exactly MG-Contest. The tablet item's export depends on that name.

2. Import the database ​

Import install/mg_contest.sql into your server database (HeidiSQL, phpMyAdmin or any MySQL client). It creates all mg_contest_* tables with their keys and indexes. See Database for details.

3. Add the tablet item ​

Players open the UI with the tablet item. Add it to the inventory you use.

lua
-- ox_inventory/data/items.lua
['tablet'] = {
    label = 'Contest Tablet',
    weight = 100,
    stack = true,
    close = true,
    consume = 0,
    description = 'Access clan management, contests, leaderboards, and the Battle Pass.',
    client = {
        image = 'tablet.png',
        export = 'MG-Contest.UseTabletItem',
    },
},
lua
-- qb-core/shared/items.lua
['tablet'] = {
    name = 'tablet',
    label = 'Contest Tablet',
    weight = 100,
    type = 'item',
    image = 'tablet.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = 'Access clan management, contests, leaderboards, and the Battle Pass.',
},

Then copy install/img/tablet.png into your inventory's image folder:

  • ox_inventory: ox_inventory/web/images/
  • qb-inventory: qb-inventory/html/images/

WARNING

The item name must match Config.LaptopItem (default tablet). On ox_inventory, keep consume = 0 so the item is not used up, and restart ox_inventory after editing its items.

4. Set admins ​

Open server/server.lua and add the Discord identifiers of everyone who should access the admin panel:

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

See Admin Panel for how permissions work.

5. Start order ​

Add the resource to server.cfg after all of its dependencies:

ini
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure ox_target

ensure MG-Contest

6. Anti-cheat include ​

The first line of fxmanifest.lua loads WaveShield:

lua
shared_script '@WaveShield/resource/include.lua'

Not using WaveShield?

Delete that line. If the WaveShield resource is not on your server, MG-Contest will fail to start.

7. Test it ​

  1. Restart the server (or refresh then ensure MG-Contest).
  2. Give yourself the item: /giveitem <id> tablet 1.
  3. Use the tablet. It should open, close with Esc, and not be consumed.
  4. Run /cmafia to check admin access.

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