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.

Static variables

@:value(500)staticpollIntervalMs:Int = 500

How often every player is tested against every zone.

Static methods

staticadd(shape:ColShape, options:ZoneOptions):Zone

@:value({ heading : 0 })staticaddBox(center:Vector3, size:Vector3, options:ZoneOptions, heading:Float = 0):Zone

@:value({ height : 0 })staticaddCircle(center:Vector3, radius:Float, options:ZoneOptions, height:Float = 0):Zone

staticaddSphere(center:Vector3, radius:Float, options:ZoneOptions):Zone

staticall():Array<Zone>

staticclear():Void

staticremove(zone:Zone):Void