Installation
Requirements
| Resource | Required |
|---|---|
| oxmysql | Yes |
qbx_core or qb-core | Yes |
ox_inventory or qb-inventory | Yes |
interact, ox_target or qb-target | Yes (one of them) |
ox_lib | Optional, for ox_lib notifications |
lb-phone, npwd or qb-phone | Optional, for phone notifications |
| A medical resource | Optional, 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.
-- 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',
},
},-- 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:
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:
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure ox_target
ensure MG-Contest6. Anti-cheat include
The first line of fxmanifest.lua loads WaveShield:
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
- Restart the server (or
refreshthenensure MG-Contest). - Give yourself the item:
/giveitem <id> tablet 1. - Use the tablet. It should open, close with Esc, and not be consumed.
- Run
/cmafiato check admin access.
