> For the complete documentation index, see [llms.txt](https://documentation.jaksam-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.jaksam-scripts.com/drugs-creator/client/territories/get-territory-owners.md).

# Get territory owners

Returns a table containing the current owner of each territory

## Export

```lua
local owners = exports["drugs_creator"]:getTerritoryOwners()
```

### Returns

| Data Type | Description                                                                |
| --------- | -------------------------------------------------------------------------- |
| table     | A table where key = territory name and value = owning job/gang name or nil |

## Example

```lua
local owners = exports["drugs_creator"]:getTerritoryOwners()

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