Skip to content

Configuration

All configuration is done in config.lua. Below is a breakdown of each section.

Framework

lua
Framework = 'qb-core',                    -- 'qb-core' or 'esx'
FrameworkResource = 'qb-core',            -- Resource name
NewFrameworkVersion = true,               -- ESX only: false for < 1.8
SharedObject = 'esx:getSharedObject',     -- ESX only (old versions)

Target System

Auto-detected:

lua
UseQbTarget = GetResourceState('qb-target') == 'started',
UseOxTarget = GetResourceState('ox_target') == 'started',

Auto-Created Gangs (QBCore)

Automatically create organizations from existing QB gang assignments:

lua
AutoCreateQBGang = {
    ['vagos'] = '#DE2A21',
    ['ballas'] = '#9D27B0',
    ['families'] = '#4CAF50',
},

When a player with one of these gangs joins, they're auto-added to the matching organization.

Jobs as Gangs

Works for both ESX and QBCore — automatically create organizations from jobs:

lua
AutoCreateJobGangs = {
    ['ambulance'] = '#E53935',
},

Law Enforcement

Unify multiple law enforcement jobs into one organization:

lua
LawEnforcementGang = true,
LawEnforcementGangName = 'lawenforcement',
LawEnforcementGangColor = '#1E88E5',
LawEnforcementJobs = {
    'police',
    'sheriff',
    'state',
},

Organization Settings

lua
CanCreateOrganizations = true,          -- Allow creation from UI
OrganizationCreationPrice = 500,        -- Cost to create
MaximumOrganizationMembers = false,     -- false = unlimited
TransfertOwnershipWhenOwnerLeave = false,
RemoveOrganizationWhenEveryMembersLeaveIt = false,

Blacklisted Jobs

Jobs that cannot open the gang UI:

lua
BlacklistedJob = {
    ['police'] = true,
    ['sheriff'] = true,
},

Currency

lua
CurrencyName = 'bitcoin',              -- Special currency item name

WARNING

This item must exist in your inventory system.

Zone Protection

lua
DefaultProtectionValue = 3,             -- Default protection for new zones
ProtectionValuePrice = 100,             -- Price multiplied by protection level
MaxProtectionLevel = 5,                 -- Maximum protection level

NPC Guards

NPCs spawn to defend owned zones:

lua
DefaultNPCValue = 0,                    -- Default guard count
NPCValuePrice = 100,                    -- Price per additional NPC
MaxNPCValue = 5,                        -- Maximum NPCs per zone
NPCSpawnWithWeaponInHand = false,
NPCAttackOnlyWhenWarOnNPCZone = true,
NPCAttackOtherDefaultGroup = false,
NPCRevertAfterCapture = true,
NPCStopAttackingOnWarEnd = true,
NPCModels = {"g_m_m_chicold_01", "csb_brucie2", "g_m_y_korean_02", "csb_vincent"},
NPCWeapons = {"weapon_pistol", "weapon_microsmg", "weapon_pumpshotgun"},

Bounty System

lua
IsBountyCK = false,                     -- Bounty = character kill (deletes character)
IsBountyStatWipe = true,                -- Wipe criminal stats on bounty death
IsBountyInventoryWipe = false,          -- Wipe inventory on bounty death
MinimalBounty = 200,                    -- Minimum bounty amount

DANGER

IsBountyCK = true will permanently delete the character. Use with extreme caution.

Zone War Settings

lua
BaseZoneWarTime = 10,                   -- War duration in minutes
PriceToStartWar = 0,                    -- Currency cost to start war
OwnedZoneAdvantage = 500,              -- Bonus points for zone owner
WarScoreIncrease = 5,                   -- Points per second per player
OrganizationCooldown = 5,              -- Minutes between wars (per org)
ZoneCooldown = 10,                     -- Minutes between wars (per zone)
CurrencyAward = 200,                   -- Currency reward on win
MaximumOrganizationWars = 1,           -- Max concurrent wars (0 = unlimited)
CriminalOnlineRequiredToStartWar = 2,
OnlyOwnerOfOrganizationCanStartWar = false,
OrganizationMembersRequiredOnlineToAttackZone = 2,

War Rewards

lua
Rewards = {
    ['bandage'] = 2,                    -- Fixed amount
    ['lockpick'] = {0, 3},             -- Random between 0-3
},

Time Restrictions

lua
TimeWhenWarCanStart = {
    { beginWar = {h = 21, m = 0}, endWar = {h = 24, m = 0} },
    { beginWar = {h = 0, m = 0}, endWar = {h = 2, m = 0} },
},

War Walls (Visual)

lua
DisplayWarWall = true,
DisplayWallWarForEveryone = false,      -- false = criminals only
DistanceToDisplayWall = 260.0,          -- Max render distance
EnableBackgroundWallEffect = true,
EnableSlidingTextWallEffect = true,
EnablePulseTextWallEffect = true,

TIP

Disable wall effects (EnableBackgroundWallEffect, etc.) if you experience FPS drops during wars.

Zone Map Shapes

lua
CubeShape = false,
CircleShape = false,
DiamondShape = true,                    -- Shape drawn around important zones

Criminal Titles

Players earn titles based on combat stats:

lua
CriminalTitles = {
    [1] = {
        Title = 'Pickpocket',
        Color = '#6e6e6e',
        Background = '#454545',
        Require = {
            ['kills'] = 0,
            ['headshots'] = 0,
            ['captured'] = 0,
            ['bounties'] = 0
        }
    },
    [2] = {
        Title = 'Bandit',
        Color = '#87b5ff',
        Background = '#214173',
        Require = {
            ['kills'] = 20,
            ['headshots'] = 2,
            ['captured'] = 0,
            ['bounties'] = 0
        }
    },
    -- Add more tiers...
},

UI

lua
OpenKey = 'F9',                         -- Key to open the menu

Discord Logging

Configure in config_discord.lua:

lua
ConfigDiscord = {
    DiscordLogEnable = false,
    DiscordMsgColor = 16494651,
    DiscordUsername = 'Core Gangs',
    DiscordAvatar = '',
    DiscordLogs = {
        ['OrganizationCreated'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        ['OrganizationJoined'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        ['WarStart'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        ['WarWin'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        ['BountyCreated'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        ['BountyEnded'] = { Enable = false, ChannelWebHook = 'YOUR_WEBHOOK' },
        -- ... more events available
    }
}

Integration

Dispatch Integration

Edit server/integration_main.lua to connect your dispatch system:

lua
function callDispatch(x, y, zoneId, source)
    -- Add your dispatch trigger here
end

Police Count Check

lua
CheckPoliceAmount = false,              -- Enable police count requirement

Implement checkPoliceAmount() in integration_main.lua to return true/false.

Custom Inventory Functions

If using UseInventory = 'custom', implement the functions in server/functions_override.lua:

  • ClearPlayerInventory(source, identifier)
  • CustomCanCarryItemStash(name, slot, maxWeight, itemName, itemAmount)
  • CustomRegisterStash(name, slot, maxWeight)
  • CustomAddItemIntoStash(stashName, itemName, amount, metadata, slot, maxWeight)
  • CustomRemoveItemIntoStash(stashName, itemName, amount, metadata, slot, maxWeight)
  • CustomOpenStorage(source, name, type)