Zones

Faster alternative to PolyZone utilising glm.polygon.

lib.zones.polyarrow-up-right

lib.zones.poly(data)
  • data: table

    • points: vector3[]

      • All z values must match

    • thickness?: number

      • Default: 4

    • onEnter: function(self: table)

    • onExit: function(self: table)

    • inside: function(self: table)

    • debug?: boolean

lib.zones.boxarrow-up-right

lib.zones.box(data)
  • data: table

    • coords: vector3

    • size?: vector3

      • Default: vec3(4, 4, 4)

    • rotation?: number

      • Angle in degrees

    • onEnter: function(self: table)

    • onExit: function(self: table)

    • inside: function(self: table)

    • debug?: boolean

lib.zones.spherearrow-up-right

  • data: table

    • coords: vector3

    • radius?: number

      • Default: 2

    • onEnter: function(self: table)

    • onExit: function(self: table)

    • inside: function(self: table)

    • debug?: boolean

Usage Examplesarrow-up-right

Zones can be deleted by using the remove method.

Zone creation scriptarrow-up-right

Similarly to PolyZone, there is a zone creation script included.

To use it use the /zone with poly, box or sphere as args.

Available controls will be displayed on the right side.

Once saved you will find the created zone details in created_zones.lua within ox_lib

Last updated