Zone Creator v0.1.2 [ For developers ]

Polyzone Creator

A script tool that facilitates easier creation of zones using the zone scripts.

Dependencies : polyzone or ox_lib

starter

cd web

yarn > yarn build

yarn build:dev for development


Alternatively, you can directly add the Releases folder to your server.

! “The script supports 2 different zone scripts. After specifying the zone script you want to use in Config.lua, import the file related to the zone script you want to use in fxmanifest.lua and remove or comment out the import related to the other script.”

examples

example Polyzone

local PolyZoneMode = exports['polyZoneCreator']:PolyZoneMode();

RegisterCommand("startCreate", function()
    local options = {
        name = string, -- (optional) the name of the zone. If not provided, a form will be opened;
        placeholder = string, -- (optional)
        buttontext = string, -- (optional)
    }

    PolyZoneMode.start(function(data)
        --  data = {
        --     succes = boolean,
        --     name = string,
        --     points = vector3[],
        --     minZ = double,
        --     maxZ = double,
        --     polyzone = polyzone,
        --     error = string
        --   }
    poly = PolyZone:Create(data.points, {
                name = data.name,
                minZ = data.minZ,
                maxZ = data.maxZ,
                debugGrid = false,
                debugPoly = false
            })
    end , options )-- (optional) 
end)

example lib.zone

local PolyZoneMode = exports['polyZoneCreator']:PolyZoneMode();

RegisterCommand("startCreate", function()
    local options = {
        name = string, -- (optional) the name of the zone. If not provided, a form will be opened;
        placeholder = string, -- (optional)
        buttontext = string, -- (optional)
    }

    PolyZoneMode.start(function(data)
        --  data = {
        --     succes = boolean,
        --     name = string,
        --     points = vector3[],
        --     thickness = number,
        --     minZ = double,
        --     polyzone = polyzone,
        --     error = string
        --   }
        poly = lib.zones.poly({
                name = data.name,
                points = data.points,
                thickness = data.thickness,
                debug = false,
                inside = inside,
                onEnter = onEnter,
                onExit = onExit
                })
    end , options) -- (optional) 
end)


Scripts

Bodycam

Arm Wrestling

Lightbar Creator

Barbecue

Video Call

4 Likes

really nice to be honest , any way you could add boxzones / circlezones to it ?

1 Like

Of course, that’s possible. For now, I’ve only added the features I needed based on my requirements. I’ll add the other zone types in the next few days. You can follow the repository to stay updated on the developments.

thats brilliant , i will 100% use it , im in the process of developing a city at the moment and this tool is a game changer

1 Like

why is not showing… on my end… :frowning:

Have you made the correct adjustments according to the zone script you are using?