Studios
XP Systemhouse-3.jpg

Installation

SoonXP SystemQBCore · Qbox · ESX
PAGE 02 OF 06  ·  OVERVIEW → INSTALLATION → CONFIGURATIONdocs.glitchstudios.dev
Browse docs

Requirements#

Server FiveM server with Lua 5.4 (lua54 'yes').
Libraries ox_lib 3.x and oxmysql 2.x.
Framework qbx_core, qb-core or es_extended. With none of them running, the standalone bridge keys players by their license.
Database MariaDB or MySQL 8. Tables are created on first start.
Optional ox_inventory for booster items, glitch-treasury for the reset fee sink, glitch-uiElements for the shared menu skin (a copy is bundled).

Installation steps#

Step What to do
1. Add the folder Put glitch-xpSystem in resources and add ensure glitch-xpSystem after ox_lib and oxmysql.
2. Database Nothing to do. player_xp, player_skills and xp_boosts are created on first start. To import them yourself, run install.sql (install.sql).
3. Admin access add_ace group.admin command.xpadmin allow. The group comes from Config.Admin.Group.
4. Booster items Add the items from Config.BoosterItems to ox_inventory (example below).
5. Outside Glitch'd Delete the @glitch-poolcleaning/guard/server.lua line in fxmanifest.lua and the cfx-nui-glitch-uiElements stylesheet line in nui/index.html.

Booster item for ox_inventory#

-- ox_inventory/data/items.lua
['mining_2xp'] = {
    label = 'Mining XP Booster',
    weight = 100,
    stack = true,
    server = { export = 'glitch-xpSystem.useXPBooster' },
},

The boost starts on usingItem, before the item is removed. A booster that can't start returns false, so the player keeps the item.

Config files#

File What it holds
config.lua Categories, menu command and key, XP popup, save interval, admin limits, booster rules and Config.BoosterItems.
skills.lua Config.Skills (points per level, resets, leaderboard, layout version) and one tree per category.
locales/translations/*.lua Text strings.

The categories and trees that ship are a working example set, and the comments name the resources that feed each one. Keep the ones you use and delete the rest. Removing a category leaves saved XP alone.

Convar Meaning
set glitch_xp_boost_webhook "https://discord.com/api/webhooks/..." Posts booster activations to Discord. Leave it unset to turn this off.