> ## 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

> Get the current owner of each territory.

Returns a table containing the current owner of each territory.

```lua Export theme={null}
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 theme={null}
local owners = exports["drugs_creator"]:getTerritoryOwners()

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


## Related topics

- [Territories](/drugs-creator/client/territories/index.md)
- [Get current territory](/drugs-creator/client/territories/get-current-territory.md)
- [Get if player is owner of vehicle plate](/jobs-creator/server/buyable-vehicles/get-if-player-is-owner-of-vehicle-plate.md)
- [Ownership changed](/drugs-creator/server/territories/ownership-changed.md)
