From 7547b74dfac29c13e219111549057cba46d79e9b Mon Sep 17 00:00:00 2001 From: Luke <39926192+LukeWasTakenn@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:26:42 +0200 Subject: [PATCH] improve clarity for zone methods --- pages/ox_lib/Modules/Zones/Shared.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pages/ox_lib/Modules/Zones/Shared.mdx b/pages/ox_lib/Modules/Zones/Shared.mdx index 0e7e2872..78102e0d 100644 --- a/pages/ox_lib/Modules/Zones/Shared.mdx +++ b/pages/ox_lib/Modules/Zones/Shared.mdx @@ -6,7 +6,8 @@ import { Callout } from 'nextra/components'; Faster alternative to PolyZone utilising [glm.polygon](https://github.com/citizenfx/lua/blob/luaglm-dev/cfx/EXTENDED.md). - Currently zones only have basic support on the server side. Some features will not work such as `onEnter`, `onExit`, and `inside`. + Currently zones only have basic support on the server side. Some features will not work such as `onEnter`, `onExit`, + and `inside`. ## lib.zones.poly @@ -64,6 +65,8 @@ lib.zones.sphere(data) Zones can be deleted by using the remove method. The data will not be cleared from the script, and can be used to recreate a zone later. ```lua +local zone = lib.zones.box({...}) + zone:remove() SetTimeout(500, function() @@ -76,6 +79,8 @@ end) Tests if a point exists inside the zone, returning a `boolean`. ```lua +local zone = lib.zones.box({...}) + if zone:contains(vec3(1, 1, 1)) then print('point is inside zone!') end