Client

ClientSide exports of the territories script.


IsMyZone

---@param territory string
---@return boolean
exports["cs-territories"]:isMyZone(territory)
exports["cs-territories"]:isMyZone()

Returns a true boolean if the organization to which it belongs has the maximum influence in that territory. If the string is left empty, it will be done with the territory in which it is located.


GetCurrent

---@return string
exports["cs-territories"]:GetCurrent()

It will return the name of the territory you are in. If you are not in any territory, it will return a false boolean.


GetMaxInfluence

---@param territory string
---@return array
exports["cs-territories"]:GetMaxInfluence(territory)

It will return a table with the appearance of the table below. If the territory is not specified, it will use the territory in which the user is located.

array = {
    ["name"] = (string or false),
    ["value"] = (int or 0)
}

You can use the "json.encode()" function to encode as string the content.


GetInfluences

---@param territory string
---@return array
exports["cs-territories"]:GetInfluences(territory)

It will return a table with the territory influences; it might be an empty table if there is no data. If a territory is not specified, the current territory will be assigned.


GetTerritories

---@return array
exports["cs-territories"]:GetTerritories()

It will return a table with all the territories information.


GetPodium

---@param territory string
---@return array
exports["cs-territories"]:GetPodium(territory)

It will return a table with the content of the conquest podium displayed in the interface. It will contain information such as the numeric value or the gang name. Similar to the HTML podium, it will only return the top three bands with the most influence, following their respective order.


GetGangInfluence

---@param gang string
---@param territorie string
---@return integer
exports["cs-territories"]:GetGangInfluence(gang, territorie)

Both fields will be mandatory. it will return the influence of a band in a specific territory.

Last updated