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

> Obtén el propietario actual de cada territorio.

Devuelve una tabla con el propietario actual de cada territorio.

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

### Valor de retorno

| Tipo de dato | Descripción |
| - | - |
| table | Una tabla donde key = nombre del territorio y value = nombre del job/gang propietario, o `nil` |

## Ejemplo

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