Zones

Used to create and manage polyzones

circle-info

Client Module - This can only be used on the client

lib.zones.register

Create a new zone

lib.zones.register(id, data)
Parameter
Type
Required
Description

name

String

Unique zone reference

data

Object

Zone options, refer to Data Structure

Zone Examples

lib.zone.register("exampleZone", {
    type = "circle",
    pos = vector3(0, 0, 0),
    radius = 5.0,
    onEnter = function(data)
        lib.print("debug", "Entered Zone")
    end,
    onExit = function(data)
        lib.print("debug", "Exited Zone")
    end,
})

lib.zones.get

Get zone information

Parameter
Type
Required
Description

name

String

Unique zone reference

lib.zones.delete

Remove a created zone

Parameter
Type
Required
Description

name

String

Unique zone reference

lib.zones.isInsideZone

Check whether a position lies inside a zone(s)

Parameter
Type
Required
Description

name

StringObject

Unique zone reference(s)

pos

Vector3

Position to be checked

Data Structure

This is the data structure of a blip and the valid options

Some zones have different requirements, see below:

Last updated