Cosmos Studios Docs
Discord
  • πŸ””Welcome to Cosmos Studios Docs!
  • πŸ‘¨β€πŸ’»Scripts
    • πŸ—ΊοΈTerritories
      • 🎨Features
      • πŸ“šInstallation
      • ⌨️Commands
      • βš™οΈConfiguration
      • πŸ€™Exports
        • Client
        • Server
Powered by GitBook
On this page
  • AddInfluence
  • RemoveInfluence
  • GetMaxInfluence
  • CheckGangInZone
  • GetTerritoriesDB
  1. Scripts
  2. Territories
  3. Exports

Server

ServerSide exports of the territories script.

Use these exports at your own risk. Please note that improper use may result in performance or stability issues. Implementing them in fast loops or modifying the script name is not recommended for proper functionality.

The ServerSide exports will modify data in the script tables. Test these exports only in a testing environment.

AddInfluence

---@param territory string
---@param gang string
---@param value integer
exports["cs-territories"]:AddInfluence(territory, gang, value)

Add influence in a territory.


RemoveInfluence

---@param territory string
---@param gang string
---@param value integer
exports["cs-territories"]:RemoveInfluence(territory, gang, value)

Remove influence in a territory.


GetMaxInfluence

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

Return a table the maximum influence of a territory.


CheckGangInZone

---@param zone string
---@param gang string
---@return boolean
exports["cs-territories"]:checkGangInZone(zone, gang)

Returns a table with the gangs located within a territory.


GetTerritoriesDB

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

Return all territories database. (JSON content)

Last updated 1 year ago

πŸ‘¨β€πŸ’»
πŸ—ΊοΈ
πŸ€™