Configuration
All configuration is done in config.lua. Below is a breakdown of each section.
C8RE In-Game Config Editor
This script includes a built-in in-game config editor powered by C8RE Tools. It is disabled by default.
To enable it, type in your server console or F8:
/core_gangsCHOOSE ONE MODE
You must pick either the config.lua file or the in-game editor — not both. Once you enable the in-game editor, any changes made to config.lua will be ignored. If you want to go back to file-based config, disable the in-game editor first.
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 — no manual setup needed:
lua
UseQbTarget = GetResourceState('qb-target') == 'started',
UseOxTarget = GetResourceState('ox_target') == 'started',Inventory
lua
UseInventory = 'core_inventory',
QBInventoryResourceName = 'qb-inventory', -- only for qb-inventory forks
ItemImagePath = 'nui://qb-inventory/html/images/', -- item image URL path| Inventory | Config Value |
|---|---|
| core_inventory | 'core_inventory' |
| ox_inventory | 'ox_inventory' |
| qs-inventory (v2.6.0+) | 'qs-inventory' |
| codem-inventory (v1.6+) | 'codem-inventory' |
| tgiann-inventory | 'tgiann-inventory' |
| qb-inventory / lj / ps (any fork) | 'qb-inventory' |
| Custom | 'custom' |
TIP
If using 'custom', implement the functions in server/functions_override.lua.
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,Default Roles
Organizations are created with default roles and permissions:
lua
DefaultRoles = {
{
name = 'Leader',
permissions = {
canInvite = true,
canKick = true,
canPromote = true,
canStartWar = true,
canManageZones = true,
}
},
{
name = 'Member',
permissions = {
canInvite = false,
canKick = false,
canPromote = false,
canStartWar = false,
canManageZones = false,
}
},
},Blacklisted Jobs
Jobs that cannot open the gang UI:
lua
BlacklistedJob = {
['police'] = true,
['sheriff'] = true,
},Currency
lua
CurrencyName = 'bitcoin', -- Special currency item nameWARNING
This item must exist in your inventory system.
UI
lua
OpenKey = 'F9', -- Key to open the menu
Locale = 'en', -- Language fileZone Protection
lua
DefaultProtectionValue = 3, -- Default protection for new zones
ProtectionValuePrice = 100, -- Price multiplied by protection level
MaxProtectionLevel = 5, -- Maximum protection levelSee Zones — Buffer Zones for how protection creates territory.
Zone Map Shapes
lua
CubeShape = false,
CircleShape = false,
DiamondShape = true, -- Shape drawn around important zonesNPC 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"},Zone Behavior When Unowned
lua
EnableGenerationWhenZoneIsNotOwned = true,
EnableProcessingWhenZoneIsNotOwned = true,
EnableSellingWhenZoneIsNotOwned = true,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 amountDANGER
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.
Field Zones
Configure plant growth and harvesting for field-type zones. See Zones — Field Zones for how picking privileges work.
lua
FieldGrowthTime = 600, -- seconds to full growth (10 min)
FieldOwnerGrowthBoost = 1.2, -- 20% faster growth for zone owners
FieldNonOwnerGrowthBoost = 1.0, -- normal speed for non-owners
OwnerPickBonus = 1.5, -- 1.5x yield for gang members
OwnerPickSplit = 0.6, -- 60% of non-member picks go to gang storage
AlertOnEnemyPick = true, -- ping gang when someone steals from their field
DrugFieldYieldBoost = 1.5, -- base multiplier from drug consumptionPlant Models
Each plant type has 3 growth stages with different models:
lua
FieldPlantModels = {
['plant1'] = {
small = 'prop_weed_01',
medium = 'prop_weed_02',
large = 'prop_weed_bucket',
},
['plant2'] = {
small = 'prop_plant_fern_02a',
medium = 'prop_plant_fern_02b',
large = 'prop_plant_fern_02c',
},
['small_plant'] = {
small = 'prop_plant_01a',
medium = 'prop_plant_01b',
large = 'prop_plant_01c',
},
},Criminal Titles
Players earn titles based on criminal stats. The system supports up to 8 tiers:
lua
CriminalTitles = {
[1] = {
Title = 'Pickpocket',
Color = '#6e6e6e',
Background = '#454545',
Require = {
['kills'] = 0,
['headshots'] = 0,
['captured'] = 0,
['bounties'] = 0,
}
},
[2] = {
Title = 'Thug',
Color = '#87b5ff',
Background = '#214173',
Require = {
['kills'] = 10,
['headshots'] = 0,
['captured'] = 0,
['bounties'] = 0,
['plants_picked'] = 8,
['drugs_used'] = 5,
}
},
-- ... up to tier 8 (Baba Yaga)
},Available Stats
| Stat | Tracked By |
|---|---|
kills | Player kills |
headshots | Headshot kills |
captured | Players captured/restrained |
bounties | Bounties completed |
wars_won | Zone wars won |
robberies | Players robbed |
npcs_killed | NPC kills |
plants_picked | Field plants harvested |
drugs_used | Drugs consumed |
drugs_sold | Drugs sold to NPCs |
Gang Controls
The full controls system — see Controls for detailed mechanics. Global toggle:
lua
EnableGangControls = true, -- master switch for all controlsEach feature has its own config block under GangControls:
lua
GangControls = {
Restrain = {
Enabled = true,
RequireItem = true,
ItemName = 'ziptie',
MaxDistance = 2.0,
EscapeEnabled = true,
EscapeKeyPresses = 80,
EscapeTimeLimit = 15000,
EscapeCooldown = 30000,
CanRestrainAnyone = true,
},
Carry = {
Enabled = true,
MaxDistance = 2.5,
RequireRestrained = true,
},
Trunk = {
Enabled = true,
MaxDistance = 3.0,
EscapeEnabled = true,
EscapeKey = 38,
HideWhenClosed = true,
},
Hostage = {
Enabled = true,
MaxDistance = 2.5,
RequireWeapon = true,
ReleaseKey = 47, -- G
KillKey = 74, -- H
KillEnabled = true,
},
Rope = {
Enabled = true,
MaxDistance = 3.0,
RequireRestrained = true,
RopeLength = 5.0,
RopeType = 4,
VehicleDragEnabled = true,
VehicleDragDamage = true,
VehicleDragDamageInterval = 2000,
VehicleDragDamageAmount = 5,
DetachKey = 47,
},
Search = {
Enabled = true,
MaxDistance = 2.5,
RequireRestrainedOrHandsUp = true,
SearchTime = 5000,
},
Tackle = {
Enabled = true,
MaxDistance = 3.0,
RequireSprinting = true,
ActionKey = 38,
Cooldown = 10000,
StunDuration = 5000,
TacklerStunDuration = 2000,
VictimRagdoll = true,
},
},NPC Drug Selling
Configure the street selling system — see Drug Selling for full mechanics.
lua
NPCSelling = {
InteractionDistance = 2.0,
SearchRadius = 50.0,
SaleCooldown = 30,
MaxZoneHeat = 100,
HeatDecayTime = 1800,
HeatPerSale = 15,
},Zone State Multipliers
lua
ZoneStates = {
unowned = {
priceMultiplier = 0.3,
pedAcceptance = 0.25,
copAlertChance = 0.05,
undercoverChance = 0.02,
heatMultiplier = 0.5,
haggleChance = 0.10,
haggleBonus = 1.5,
haggleFailChance = 0.55,
},
enemy = {
priceMultiplier = 0.75,
pedAcceptance = 0.60,
copAlertChance = 0.15,
undercoverChance = 0.05,
heatMultiplier = 1.5,
gangPingChance = 0.65,
gangPingDuration = 30,
haggleChance = 0.25,
haggleBonus = 1.6,
haggleFailChance = 0.50,
},
owned = {
priceMultiplier = 1.0,
pedAcceptance = 0.85,
copAlertChance = 0.08,
undercoverChance = 0.03,
heatMultiplier = 0.8,
streetRepPerSale = 2,
haggleChance = 0.40,
haggleBonus = 1.75,
haggleFailChance = 0.30,
},
},Street Reputation
lua
StreetReputation = {
enabled = true,
maxRep = 100,
repPerSale = 3,
repDecayPerHour = 5,
acceptanceBonus = 0.001, -- +0.1% per rep point (max +10%)
priceBonus = 0.005, -- +0.5% per rep point (max +50%)
},Sellable Items
lua
SellableItems = {
['weed_baggy'] = { basePrice = 3, maxPerSale = 2 },
['weed_ogkush'] = { basePrice = 5, maxPerSale = 3 },
['weed_purplehaze'] = { basePrice = 6, maxPerSale = 3 },
['cokebaggy'] = { basePrice = 8, maxPerSale = 4 },
['crack_baggy'] = { basePrice = 7, maxPerSale = 3 },
['meth'] = { basePrice = 10, maxPerSale = 4 },
['xtcbaggy'] = { basePrice = 12, maxPerSale = 5 },
['oxy'] = { basePrice = 5, maxPerSale = 2 },
},Drug Consumables
Configure usable drug items — see Consumables for all effects and bonuses.
lua
DrugConsumables = {
['weed_baggy'] = {
duration = 40,
animation = 'blunt',
effects = { 'intenseEffect', 'healthRegen', 'foodRegen' },
boost = {
sellMultiplier = 1.15,
haggleReduction = 5,
fieldYield = 1.0,
},
},
['cokebaggy'] = {
duration = 60,
animation = 'sniff',
effects = { 'runningSpeedIncrease', 'infiniteStamina', 'focusEffect', 'psychoWalk' },
boost = {
sellMultiplier = 1.4,
haggleReduction = 20,
fieldYield = 1.0,
},
},
['crack_baggy'] = {
duration = 40,
animation = 'sniff',
effects = { 'runningSpeedIncrease', 'infiniteStamina', 'moreStrength', 'fogEffect', 'psychoWalk', 'cameraShake' },
boost = {
sellMultiplier = 1.5,
haggleReduction = 25,
fieldYield = 1.0,
},
},
['meth'] = {
duration = 150,
animation = 'pill',
effects = { 'runningSpeedIncrease', 'infiniteStamina', 'moreStrength', 'whiteoutEffect', 'psychoWalk' },
boost = {
sellMultiplier = 1.3,
haggleReduction = 15,
fieldYield = 1.3,
},
},
['xtcbaggy'] = {
duration = 120,
animation = 'pill',
effects = { 'intenseEffect', 'infiniteStamina', 'healthRegen', 'drunkWalk' },
boost = {
sellMultiplier = 1.2,
haggleReduction = 30,
fieldYield = 1.1,
},
},
['oxy'] = {
duration = 100,
animation = 'inject',
effects = { 'focusEffect', 'healthRegen', 'armorRegen' },
boost = {
sellMultiplier = 1.1,
haggleReduction = 10,
fieldYield = 1.8,
},
},
},Animation Types
| Type | Description |
|---|---|
blunt | Smoking joint with particle effects |
sniff | Snorting animation |
pill | Swallowing animation |
inject | Needle injection |
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
endPolice Count Check
lua
CheckPoliceAmount = false, -- Enable police count requirementImplement 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)
