> For the complete documentation index, see [llms.txt](https://cosmos-studios.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cosmos-studios.gitbook.io/documentation/scripts/territories/exports/client.md).

# Client

***

{% hint style="warning" %}
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 client-side exports will not modify anything in the script, they will only return information for obvious security reasons.
{% endhint %}

## IsMyZone

```lua
---@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

```lua
---@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

```lua
---@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.

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

{% hint style="info" %}
You can use the "json.encode()" function to encode as string the content.
{% endhint %}

***

## GetInfluences

<pre class="language-lua"><code class="lang-lua">---@param territory string
---@return array
<strong>exports["cs-territories"]:GetInfluences(territory)
</strong></code></pre>

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

<pre class="language-lua"><code class="lang-lua">---@return array
<strong>exports["cs-territories"]:GetTerritories()
</strong></code></pre>

It will return a table with all the territories information.

***

## GetPodium

```lua
---@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

```lua
---@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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cosmos-studios.gitbook.io/documentation/scripts/territories/exports/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
