Configuration
The options of config.lua, section by section.
Everything lives in config.lua. Every option is commented in the file itself; this page explains the ones you are most likely to change.
Options left on 'auto' are detected on start. Set a fixed value only if the detection picks the wrong resource.
General#
Config.Debug = false
Config.Locale = 'fr' -- 'fr' / 'en'
Config.Framework = 'auto' -- 'esx' / 'qbcore' / 'qbox' / 'standalone'
Config.Target = 'auto' -- 'ox_target' / 'qb-target' / 'none'
Config.Inventory = 'auto'
Config.Dispatch = 'auto'
Config.Database = 'auto' -- 'oxmysql' / 'mysql-async' / 'ghmattimysql'
Config.Notification = 'ox_lib' -- 'ox_lib' / 'framework' / 'native' / 'custom'With Config.Target = 'none', every interaction uses a help text and the [E] key. With Config.Notification = 'custom', notifications go through Custom.Notify in client/custom.lua.
Player table#
Config.PlayerTable = {
table = '',
identifier = '',
column = '',
}Leave it empty. The values come from your framework:
| Framework | Table | Identifier |
|---|---|---|
| ESX | users | identifier |
| QBCore / Qbox | players | citizenid |
| Standalone | cube_gang_players (created) | identifier |
Fill it only if your framework stores characters in another table. The gang of each character is saved in a JSON column (cube_gang by default), added automatically.
Admin & commands#
Config.AdminAce = 'cubegang.admin'
Config.AdminGroups = { 'admin', 'superadmin', 'god' }
Config.PoliceJobs = { 'police', 'sheriff' }
Config.Commands = {
menu = 'gang',
creator = 'gangcreator',
zoneCreator = 'zonecreator',
}PoliceJobs is used for the dispatch, the minimum police count to sell drugs and the jobs that cannot join a gang. See Commands.
Money#
Config.Money = {
account = 'money',
dirty = false,
dirtyAccount = 'black_money',
dirtyItem = false,
}With dirty = true, drug sales pay in dirty money: the dirtyItem if set (for example 'markedbills'), otherwise the dirtyAccount.
Gangs#
Config.Gangs = {
maxMembers = 20,
defaultColor = '#C51111',
inviteTimeout = 30,
inviteDistance = 4.0,
blacklistedJobs = { 'police', 'sheriff', 'ambulance' },
types = {
{ name = 'gang', label = 'Gang' },
{ name = 'mafia', label = 'Mafia' },
{ name = 'mc', label = 'MC' },
{ name = 'cartel', label = 'Cartel' },
},
}Never rename the name of a type once gangs use it. Change the label instead.
Permissions & ranks#
Permissions are grouped by gang point and given to ranks in the creator or the boss menu.
| Permission | Allows |
|---|---|
boss.open | Open the boss menu |
boss.members | Invite, kick and promote members |
boss.ranks | Create, edit, order and delete ranks |
boss.settings | Change the gang color and logo |
stash.open | Open the gang stash |
garage.use | Use the gang garage |
treasury.deposit | Deposit money |
treasury.withdraw | Withdraw money |
treasury.history | See the treasury history |
Config.Ranks = {
max = 10,
inheritance = true,
defaults = {
{ label = 'Chef', leader = true },
{ label = 'Sous-chef', permissions = { 'boss.open', 'boss.members', 'boss.ranks', 'treasury.withdraw', 'treasury.history' } },
{ label = 'Lieutenant', permissions = { 'boss.open', 'boss.members', 'garage.use' } },
{ label = 'Membre', permissions = { 'stash.open', 'treasury.deposit' } },
{ label = 'Recrue', permissions = {} },
},
}defaults are the ranks given to a new gang, from the highest to the lowest. The first one must be the leader, who always has every permission. With inheritance, a rank also has the permissions of every rank below it.
Gang points#
Config.Locations = {
{ name = 'boss', icon = 'fa-solid fa-crown', permissions = { 'boss.open' }, distance = 1.5 },
{ name = 'stash', icon = 'fa-solid fa-box-archive', permissions = { 'stash.open' }, distance = 1.5 },
{ name = 'treasury', icon = 'fa-solid fa-sack-dollar', permissions = { 'treasury.deposit', 'treasury.withdraw', 'treasury.history' }, distance = 1.5 },
{ name = 'garage', icon = 'fa-solid fa-warehouse', permissions = { 'garage.use' }, distance = 3.0, heading = true, preview = 'sultan' },
}
Config.Treasury = { account = 'money', maxTransaction = 1000000 }
Config.Stash = { enabled = true, slots = 50, weight = 200000 }A player needs one of the listed permissions to interact with a point. The garage only exposes the point - plug your own garage in, see Custom functions.
Score#
Config.Points = {
drugSale = 1,
zoneCaptured = 50,
zoneLost = -25,
zoneOwned = 10,
allowNegative = false,
historyLimit = 50,
}zoneOwned is given for every owned territory every Config.Territories.payoutInterval minutes.
Drug selling#
Config.Drugs = {
enabled = true,
gangOnly = false,
minPolice = 0,
chances = { accept = 70, reject = 20, report = 10 },
multipliers = { owned = 1.25, neutral = 1.0, rival = 0.8 },
preferences = { enabled = true, rotation = 60, liked = 1, disliked = 1, bonus = 1.3, malus = 0.7 },
items = {
{ name = 'weed', price = { min = 40, max = 60 }, influence = 1.0 },
{ name = 'meth', price = { min = 70, max = 95 }, influence = 1.5 },
{ name = 'cocaine', price = { min = 90, max = 120 }, influence = 2.0 },
},
}chances must add up to 100. The final price is unit price × amount × territory multiplier × drug demand. See Drug market.
Territories & influence#
Config.Territories = {
enabled = true,
maxInfluence = 100.0,
minOwnership = 25.0,
contest = 0.5,
decay = { interval = 60, amount = 2.0 },
payoutInterval = 60,
}Config.Influence enables extra ways to gain influence: presence, kills and robberies. Both are explained in Territories.
Map#
Config.MapZones = {
enabled = true,
visibility = 'all', -- 'all' / 'gang' / 'own'
showNeutral = true,
logos = true,
command = 'gangzones',
toggleKey = 'G',
hint = 'scaleform', -- 'scaleform' / 'nui' / false
fillAlpha = 120,
neutralAlpha = 60,
neutralColor = '#969696',
borderColor = '#FFFFFF',
}visibility | Who sees the territories |
|---|---|
all | Every player |
gang | Gang members only |
own | Members only see the territories of their own gang |
Webhooks#
Discord logs are configured in server/webhooks.lua, a server-only file. Leave a webhook empty to disable that log.