Add Gang & Tribute Zone

On this page, I'll give you snippets on how to add gang and tribute zone to Gangs - Territory, Wars, Tribute Zones!

Config (cfg.lua)

If you want to add new gang or tribute zone, you must add it to the config. I will explain how to add.

Add New Gang

  • We need use ox_lib zone creation for add new gang. After installed ox_lib, write /zone poly command in-game and open zone editor. Once you have selected the points you want, save them with any name. Go to ox_lib/created_zones.lua and you will see similar below picture. Copy points table and thickness.

  • Open the config file. (rm_gangs/cfg.lua)

  • Find this lines:

    cfg.gangs
  • Add new gang like this:

    ['newGangName'] = { -- /setjob /setgang name
            color = '#newGangColor',
            territory = { -- created_zones.lua points, paste here
                points = {
                    
                },
                thickness = 28.6, -- created_zones.lua thickness, paste here
            },
            locations = { -- new gang coords, if you want remove any menu, just comment line example: stash below
                menu = vec3(0.0, 0.0, 0.0),
                clothing = vec3(0.0, 0.0, 0.0),
                garage = vec4(0.0, 0.0, 0.0, 0.0),
                --stash = vec3(0.0, 0.0, 0.0),
            },
        },

Add New Tribute Zone

  • We need use ox_lib zone creation for add new tribute zone. After installed ox_lib, write /zone poly command in-game and open zone editor. Once you have selected the points you want, save them with any name. Go to ox_lib/created_zones.lua and you will see similar below picture. Copy points table and thickness.

  • Open the config file. (rm_gangs/cfg.lua)

  • Find this lines:

    cfg.tributeZones
  • Add new tribute zone like this:

    {
            name = 'new_tribute_zone',
            label = 'New Tribute Zone',
            paymentAmount = 1500,
            npc = {
                model = `a_m_m_bevhills_02`,
                coord = vec4(82.78, -1553.80, 29.60, 50.47), -- tribute giving npc position
            },
            territory = {
                points = { -- created_zones.lua points, paste here
                    
                },
                thickness = 8.35, -- created_zones.lua thickness, paste here
            },
            resetCronExpression = '00 20 * * mon', --on monday at 08:00 PM
            captureDuration = 10,                  --minutes
        },

Notes

-- tribute zone event starts automatically on the server when the time defined in resetCronExpression arrives
-- also admins and authorized persons can start the event at any time with the "starttribute" command
-- https://overextended.dev/ox_lib/Modules/Cron/Server#cron-expression
-- https://crontab.guru/#0_20_*_*_fri

Last updated