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

> Obtén el nombre del territorio en el que se encuentra actualmente el jugador local.

Devuelve el nombre del territorio en el que se encuentra actualmente el jugador local, o `nil` si está fuera de cualquier territorio.

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

### Valor de retorno

| Tipo de dato | Descripción |
| - | - |
| string / nil | El nombre del territorio, o `nil` si el jugador no está en ninguno |

## Ejemplo

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

if territory then
    print("You are in territory: " .. territory)
else
    print("You are not inside any territory")
end
```


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