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

# Zones.lua

# Zones

The zones system will allow you to define a spawn zone in which entities will be spawn when a player gets near them.

## Zones Configuration

### Example Zone

```lua theme={null}
['oil_fields'] = {
    coords = vector3(480.8108520507813, 645.7635498046875, 115.76087951660156),
    radius = 60.0,
    -- IMPORTANT, it must be the total sum of the entities in the population
    targetPop = 41,
    population = {
        ['infect1'] = 30,
        ['gunslinger'] = 11,
    },
    -- Cooldown for (re)spawn in seconds
    spawnCooldown = 1800
},
```
