Skip to content

House Zones

House zones are gang headquarters — secure buildings with locked doors and storage that only the owning organization can access. When a gang captures or is assigned a house zone, their members automatically get access to all linked doors and storages inside.

This system integrates with ox_doorlock or qb-doorlock — whichever your server runs. No config needed, it auto-detects.

How It Works

1. Admin Sets Up Doors
Use your doorlock resource (/doorlock or /newdoor) to create doors on the MLO as usual.
2. Link Doors to Zone
Use /criminal linkdoor to connect door IDs to a house zone. That's it.
3. Auto-Sync
Core Gangs handles the rest. Ownership changes, member joins/leaves — door access updates automatically.

KEY CONCEPT

You set up doors once. Core Gangs dynamically manages who can open them based on zone ownership. When a gang loses the zone in a war, they lose door access instantly — the new owners get it.

Setup Guide

1

Create doors on the MLO

Use your doorlock resource to set up doors on the house MLO like you normally would.

ox_doorlock:

/doorlock

qb-doorlock:

/newdoor

Set up each door on the MLO — front door, back door, storage room, whatever you need. Don't set any jobs, gangs, or citizen IDs on the doors — Core Gangs will manage access automatically.

IMPORTANT

Leave the door's access fields empty (no authorized jobs, gangs, or citizen IDs). Core Gangs overwrites the characters field (ox_doorlock) or authorizedCitizenIDs field (qb-doorlock) whenever access is synced. Any manually set values will be replaced.

2

Find your IDs

Zone ID — Stand in the house zone and type:

/criminal zone

Check the F8 console for the zone ID.

Door IDs:

  • ox_doorlock — Door IDs are numbers. Check your ox_doorlock database table or the F8 console output when creating a door.
  • qb-doorlock — Door IDs are usually strings like 'configname-dooridentifier' or numbers. Check your qb-doorlock config files.
3

Use the admin command to connect each door to the house zone:

/criminal linkdoor <zoneId> <doorId>

Examples:

lua
-- ox_doorlock (numeric IDs)
/criminal linkdoor 7067 1
/criminal linkdoor 7067 2
/criminal linkdoor 7067 3

-- qb-doorlock (string IDs)
/criminal linkdoor 7067 ballas-frontdoor
/criminal linkdoor 7067 ballas-backdoor

You can link as many doors as you want to a single zone. Each door ID is stored in the database — it persists across restarts.

To check which doors are linked:

/criminal zonedoors 7067

To remove a door:

/criminal unlinkdoor 7067 2
4

Assign ownership

Either assign the zone to an org manually:

/criminal setzone 7067 ballas

Or let gangs capture it through the war system (if HouseZoneCapture = true).

Once an org owns the zone, all their members can open the linked doors. That's it — fully automatic from here.

When Does Access Update?

Access is re-synced automatically whenever any of these happen:

EventWhat happens
Zone captured in warOld gang loses access, winning gang gets access
Admin assigns zone (/criminal setzone)New org members get access
Admin resets zone (/criminal resetzone)All access removed
Player joins org (invite code or direct invite)Player gets access to all org house zone doors
Player leaves orgPlayer loses access
Player kicked from orgPlayer loses access
Org deletedAll access removed from all org zones
Server restartAll house zone doors re-synced on startup

Commands

admin/criminal linkdoor
qb-coreesx

Link a doorlock door to a house zone. The owning organization's members will get access.

ArgumentTypeDescription
zoneIdHouse zone ID (from /criminal zone)
doorIdDoor ID from ox_doorlock (number) or qb-doorlock (string/number)
Usage
lua
/criminal linkdoor 7067 1
/criminal linkdoor 7067 ballas-frontdoor
admin/criminal unlinkdoor
qb-coreesx

Remove a door from a house zone. The door's access list will be cleared.

ArgumentTypeDescription
zoneIdHouse zone ID
doorIdDoor ID to unlink
Usage
lua
/criminal unlinkdoor 7067 1
admin/criminal zonedoors
qb-coreesx

List all doors currently linked to a house zone.

ArgumentTypeDescription
zoneIdHouse zone ID
Usage
lua
/criminal zonedoors 7067

Required Code for qb-doorlock

If you're using qb-doorlock, you need to add two exports to its server file so Core Gangs can manage door access. Open qb-doorlock/server/main.lua and paste this at the very bottom:

lua
-- Exports for external resources (e.g. core_gangs doorlock integration)

exports('getDoor', function(doorID)
    local door = Config.DoorList[doorID]
    if not door then return false end
    return door
end)

exports('editDoor', function(doorID, data)
    local door = Config.DoorList[doorID]
    if not door then return end
    for k, v in pairs(data) do
        door[k] = v
    end
end)

ox_doorlock

If you're using ox_doorlock, no extra code is needed — it already has the exports Core Gangs uses (getDoor, editDoor).

Exports

These exports let other resources interact with the house zone door system:

serverexports['core_gangs']:linkDoorToZone(zoneId, doorId)

Link a doorlock door to a house zone programmatically.

ParameterTypeDescription
zoneIdnumberHouse zone ID
doorIdnumber|stringDoor ID from your doorlock resource
Returns: boolean
Example
lua
exports['core_gangs']:linkDoorToZone(7067, 1)
serverexports['core_gangs']:unlinkDoorFromZone(zoneId, doorId)

Remove a door from a house zone.

ParameterTypeDescription
zoneIdnumberHouse zone ID
doorIdnumber|stringDoor ID to unlink
Returns: boolean
Example
lua
exports['core_gangs']:unlinkDoorFromZone(7067, 1)
serverexports['core_gangs']:updateZoneDoorAccess(zoneId)

Force re-sync door access for a specific house zone. Useful if you modify org membership externally.

ParameterTypeDescription
zoneIdnumberHouse zone ID
Returns: nil
Example
lua
exports['core_gangs']:updateZoneDoorAccess(7067)
serverexports['core_gangs']:updateOrgDoorAccess(orgName)

Force re-sync door access for ALL house zones owned by an organization.

ParameterTypeDescription
orgNamestringOrganization name
Returns: nil
Example
lua
exports['core_gangs']:updateOrgDoorAccess('ballas')