Gang wars over the map, by m-Scripts
TURF

Take the block. Hold the block.

Zones on the map in the colour of the gang that holds them. Stand your ground to take one, then collect its income and buy from its dealer. A tablet with a live map shows every fight.

The live map in the tablet with a contested territory
The list of territories with owner, income and status
The capture bar shown to everyone in the zone
The gang ranking with territories held, captures, lost and income
My gang page with the stash of every territory
The admin page to create and edit territories
01The map

See the city.
Live.

Type /territories and the tablet opens on a live map. Every zone shows its owner, its income and any fight in progress. Set a waypoint in one click.

02Territories

Open.
Contested. Protected.

The list shows every territory with its owner, its income and its state. Search it by name.

03The fight

Hold the zone.
Beat the clock.

A member with a gun talks to the dealer and the clock starts. Anyone from another gang inside stops it. A bar at the top of the screen shows everyone in the zone how it is going.

04Gangs

Who runs
the city.

The ranking counts the territories each gang holds, its captures, its losses and its income.

05My gang

Fill the stash.
Cash it in.

Every owned territory adds its income to a stash on a timer. My gang shows how much waits in each one. Collect it at the territory.

06Admin

Draw the map.
In game.

Admins create a territory where they stand, then edit its name, radius and income, move it, make it neutral or delete it. All from the tablet.

How a war works

Take it.
Hold it. Earn it.

Every number below is a default you can change in config/main.lua.

01 · Take it

Stand your ground

Talk to the dealer with a gun in hand and hold the zone for 3 minutes. Another gang inside stops the clock. Leave for 15 seconds and the attack fails.

180 secondsGun in handContested
02 · Hold it

Protected

A territory that changes hands can't be attacked for 30 minutes. A gang that fails has to wait 10 minutes before trying the same place again.

30 min protection10 min cooldownOwners alerted
03 · Earn it

Income and a dealer

Every 15 minutes the territory fills its stash, up to 10 times its income. The dealer sells to the gang that holds it, at night by default.

Every 15 minBlack moneyNight market
0Seconds to take a zone
0Minutes of protection after a capture
0Minutes between income drops
0Gang colours ready in the config
0Territories ready on the first start
Everything in the box

The whole map.
Up for grabs.

Live map

The tablet draws every zone in its owner's colour and marks the fights in progress.

Tablet

Its own tablet

Map, territories, gangs, my gang and admin in one screen. Open it with /territories or an item.

NUI

Zones in colour

Each territory is a zone and a blip on the map in the colour of the gang that holds it.

Map

A dealer in every zone

An NPC stands in the middle of each territory. Talk to him to attack, collect or shop.

Dealer

Capture timer

Hold the zone for 180 seconds by default. The time only runs while no rival is inside.

Capture

Contested

Anyone from another gang in the zone stops the clock while they stay inside.

Fight

Armed to start

A gun in hand is needed to start an attack. One switch in the config turns that off.

Rule

Members online

Set how many attackers must be online, and how many owners must be online to be attacked.

Rule

Protection

A territory that just changed hands is safe for 30 minutes by default.

Rule

Retry cooldown

A gang that fails waits 10 minutes before it can try the same territory again.

Rule

Leave and lose

If the attackers leave the zone for 15 seconds, the attack fails and the owners hear about it.

Fight

Shared reward

Members still in the zone at the end split a reward of 2,500 to 5,000 in black money.

Reward

Income stash

Every owned territory adds its income to its stash every 15 minutes, up to 10 times its income.

Income

Collect at the zone

Any member of the owner gang collects the stash at the territory, from the dealer or the tablet.

Income

Black market

The dealer sells to the gang that holds his territory, from 21:00 to 05:00 server time by default.

Market

Your own stock

The market list is items and prices in the config. Pay in cash or from the bank.

Config

Gang ranking

Territories held, captures, losses and income for every gang, kept in the database.

Ranking

Progress bar

Everyone in the zone sees the bar, the time left and how many are on each side.

HUD

Owners warned

The owner gang gets a message when its territory is attacked, taken or defended.

Alerts

Police alerts

A 50% chance by default that the police get a call when a territory is attacked.

Police

Gang colours

A colour for the tablet and a blip colour for the map, per gang. Others get the default.

Config

Gangs on ESX

QBCore and Qbox use the real gangs. On ESX, the jobs you list count as gangs.

Frameworks

Checked on the server

Who is in the zone, the timers, the gang, the money and the admin rights are all checked on the server.

Security

Discord logs

Attacks, captures, income, market buys and new or deleted territories go to one webhook.

Webhook
Straight answers

What you get.
What you need.

Included

  • The script with its own tablet, in English and Portuguese
  • 4 territories made on the first start
  • Colours and blips for 7 gangs, ready in the config
  • A black market list you can change
  • A Discord webhook for the logs

Good to know

  • Needs ox_lib and oxmysql. Nothing to import, the tables are made on start
  • Give admins the territories.admin ace, or put their identifiers in the config
  • The market items must exist in your inventory
  • On ESX, add your gang jobs to Config.GangJobs
  • The market hours follow the server clock
Plugs into your server

Your stack.
Already supported.

Framework, inventory and target are found on their own when the server starts. Or set each one by hand in the config.

Framework

QboxQBCoreESX

Inventory

ox_inventoryqb-inventoryESX

Target

ox_targetqb-target

Dispatch

m-Mdtps-dispatchcd_dispatchqs-dispatchNotify and blip

Languages

EnglishPortuguese

Needs

ox_liboxmysql

For server owners

Your rules.
A few lines.

-- taking a territory
Config.Capture = {
    seconds = 180,
    armed = true,
    attackers = 1,
    defenders = 0,
    protection = 30 * 60,
    cooldown = 10 * 60,
    reward = { 2500, 5000 },
    rewardAccount = 'black_money',
}

-- income: every 15 minutes, up to 10 times the territory income
Config.Income = { minutes = 15, cap = 10, account = 'black_money' }
FAQ

Before you buy.

Where are the territories?

Four are made on the first start. After that they live in the database and admins create, move and edit them from the tablet, where they stand.

Does it work on ESX?

Yes. QBCore and Qbox use the real gangs. ESX has no gangs, so the jobs in Config.GangJobs count as gangs there.

Can a gang lose a territory while offline?

By default, yes. Set Config.Capture.defenders to the number of owner members that must be online before their territory can be attacked.

Which dispatch does it use?

m-Mdt when it runs. Otherwise ps-dispatch, cd_dispatch or qs-dispatch. With none of them, officers on duty get a notification and a blip.

Can I change what the dealer sells?

Yes. Config.Market is a list of items and prices, and Config.Dealer sets the hours and the ped model.

Who can use the admin page?

Players with the territories.admin ace, or the identifiers you put in Config.Admins.

OWNTHE MAP.

Available now for 18.45 EUR.

Buy Territories