class Zones
package fivem.server.core
Server-side zone tracking: enter and exit callbacks over the shapes in
fivem.shared.colshape, evaluated against every connected player.
Zones.add(new Circle(bankVault, 8.0, 5.0), {
onEnter: (_, player) -> Logger.info("vault", '${player.name} entered'),
onExit: (_, player) -> Logger.info("vault", '${player.name} left')
});
The server has no per-frame tick, so this polls on a timer — 500 ms by default. That is the right trade: server zone checks are for authoritative decisions (may this player open the vault?), not for responsive UI, which belongs on the client where per-frame polling is free.
Cost is players × zones per poll, with a cheap bounding-sphere rejection first. That's fine into the hundreds; beyond that, bucket your zones spatially rather than registering thousands here.