Territories
This script features a territory control system that uses points to determine which gang dominates a specific area. It uses GTA native zones; custom zones (or polyzones) are not supported. Points are gained or lost through various in-game events, you also have client exports you can trigger from your own scripts.

Territory Colors
Gangs can set their own territory color in Settings tab > Gang Color, this option will also change the UI color to match their gang style.

Exports
getZone()
Retrieves the gang that controls the zone where player is standing.
returns
result:
string | false
Gang name or false if the zone isn't controlled by any ganglocal controlled = exports['av_gangs']:getZone() print(controlled)
myZone()
Returns true if the current zone is controlled by the player gang or false.
returns
result:
boolean
local myZone = exports['av_gangs']:myZone() print(myZone)
addZoneXP(amount)
Add the desired points to the zone where the player is standing.
params:
amount:
number
Amount of points to add to zone.local toAdd = 10 exports['av_gangs']:addZoneXP(toAdd) -- will add 10 points to current zone
removeZoneXP(amount)
Remove points to the zone where the player is standing.
params:
amount:
number
Amount of points to remove from zonelocal toRemove = 5 exports['av_gangs']:removeZoneXP(toRemove) -- will remove 5 points to zone
Last updated