Skip to content

CreateCircleZone

A circular zone around a point - a cylinder of any height, or of a band.

Without zMin and zMax the height does not matter; with zMin < zMax only that band counts.

CreateCircleZone(x, y, radius [, zMin, zMax])
Parameter Type
x number the centre, metres
y number metres
radius number metres
zMin number the bottom of the band (optional)
zMax number the top of the band; without a band any height counts (optional)

number - the zone’s id; nil when none is free

local spawnX, spawnY = GetDefaultSpawn()
local spawnZone = CreateCircleZone(spawnX, spawnY, 12)

CreateZone · IsPlayerInZone · the Zones group of the index