> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get territory owners

> Récupère le propriétaire actuel de chaque territoire.

Retourne une table contenant le propriétaire actuel de chaque territoire.

```lua Export theme={null}
local owners = exports["drugs_creator"]:getTerritoryOwners()
```

### Retour

| Type de donnée | Description |
| - | - |
| table | Une table où clé = nom du territoire et valeur = nom du job/de la gang propriétaire, ou `nil` |

## Exemple

```lua theme={null}
local owners = exports["drugs_creator"]:getTerritoryOwners()

for territoryName, ownerFaction in pairs(owners) do
    print(territoryName .. " is owned by " .. (ownerFaction or "nobody"))
end
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.