From 1251163fdc6e3f9675d6c44d2a86e74c9ef502a5 Mon Sep 17 00:00:00 2001 From: pedropapa Date: Sat, 28 Jun 2025 16:26:52 +1000 Subject: [PATCH 1/4] feat: Add BoxZone and CircleZone exports --- exports.lua | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 exports.lua diff --git a/exports.lua b/exports.lua new file mode 100644 index 0000000..736cc5f --- /dev/null +++ b/exports.lua @@ -0,0 +1,33 @@ +exports("BoxZone", function() + return { + Create = function(center, length, width, options) + center = vector3(center.x, center.y, center.z or 0.0) + local zone = BoxZone:Create(center, length, width, options) + + if options and options.onPlayerInOut then + zone:onPlayerInOut(function(isInside, point) + options.onPlayerInOut(isInside, point) + end) + end + + return zone + end, + } +end) + +exports("CircleZone", function() + return { + Create = function(center, radius, options) + center = vector3(center.x, center.y, center.z or 0.0) + local zone = CircleZone:Create(center, radius, options) + + if options and options.onPlayerInOut then + zone:onPlayerInOut(function(isInside, point) + options.onPlayerInOut(isInside, point) + end) + end + + return zone + end, + } +end) \ No newline at end of file From 692f6588471889a08f1b3cdbc968ed874509ebd0 Mon Sep 17 00:00:00 2001 From: pedropapa Date: Sat, 28 Jun 2025 16:27:04 +1000 Subject: [PATCH 2/4] feat: Add 'exports.lua' to client scripts --- fxmanifest.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 19fa7a0..dd4f678 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -11,7 +11,8 @@ client_scripts { 'EntityZone.lua', 'CircleZone.lua', 'ComboZone.lua', - 'creation/client/*.lua' + 'creation/client/*.lua', + 'exports.lua', } server_scripts { From f5eaa89671d4f364a499d44861a94d22a84a2eb2 Mon Sep 17 00:00:00 2001 From: pedropapa Date: Sat, 28 Jun 2025 16:41:21 +1000 Subject: [PATCH 3/4] feat: Add BoxZone and CircleZone exports --- exports.lua => creation/client/exports.lua | 0 fxmanifest.lua | 1 - 2 files changed, 1 deletion(-) rename exports.lua => creation/client/exports.lua (100%) diff --git a/exports.lua b/creation/client/exports.lua similarity index 100% rename from exports.lua rename to creation/client/exports.lua diff --git a/fxmanifest.lua b/fxmanifest.lua index dd4f678..d148941 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -12,7 +12,6 @@ client_scripts { 'CircleZone.lua', 'ComboZone.lua', 'creation/client/*.lua', - 'exports.lua', } server_scripts { From 7f91155906608e36aba38b116b2139df9a1586ec Mon Sep 17 00:00:00 2001 From: pedropapa Date: Sat, 28 Jun 2025 16:42:01 +1000 Subject: [PATCH 4/4] fix: Correct formatting in client_scripts section of fxmanifest.lua --- fxmanifest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index d148941..19fa7a0 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -11,7 +11,7 @@ client_scripts { 'EntityZone.lua', 'CircleZone.lua', 'ComboZone.lua', - 'creation/client/*.lua', + 'creation/client/*.lua' } server_scripts {