Page cover

πŸ“ƒUsage

Everything you need to understand how to use the script.

Command

/startcapturethearea zonename

circle-info

You can use it from the console or in-game if you have the permissions you've set in IsAllowedToStart() configurable open function.

Exports

Start Event Out Of Schedule (Server-Sided)

exports["petris-capturethearea"]:StartEvent() -- For Random Area Selection

exports["petris-capturethearea"]:StartEvent("AreaName") -- For Specific Area

Check If Player Is Capturing (Client-Sided)

exports["petris-capturethearea"]:IsPlayerCapturing()

Check If Player Is In Zone (Client-Sided)

exports["petris-capturethearea"]:IsPlayerInZone()

Weekly Schedule Configuration

Schedule = {
        ['Monday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Tuesday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Wednesday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Thursday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Friday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Saturday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        },
        ['Sunday'] = {
            {zone = "House", hour = 14, minute = 0}, -- 14:00 - 2:00PM
            {zone = "random", hour = 18, minute = 30}, -- 18:30 - 6:30PM
        }
    },
circle-info

In the zone value, you can either set "random" to let the script select one of your configured zones or the name of a specific zone of your configured zones.

Areas/Zones Configuration

circle-info

In order to create a zone properly, you must create a polyzone via PolyZone arrow-up-rightscript. /pzcreate : To start the creation of a zone. /pzadd : To add points of a zone. (Better use zone corners for points) /pzfinish : To finish the zone. After that, a text file will be generated in the same location where your server.cfg is located at.

Open Framework Functions

circle-info

We've added ESX functionality as it's the most popular framework right now, but you can use any framework and make the script work. If you need extra assistance, please don't hesitate to open a ticket on my Discord Server.arrow-up-right

Last updated