[PAID][ESX] Gangwar 1.1 Update | MK-Services

This resource is compatible with ESX v1.1 / ESX 1.2 (v1 Final) / ESX Legacy (v1.3 - v1.9.5)/ Extendedmode.

Looking for an advanced, unique and configurable Gangwar Script? Here ya go!

New Updated Features

  • More options to customize
  • Webhook for area overview
  • K/D HUD
  • Scoreboard to see all KDs

Features

  • Fully configurable Gangwar zones
  • Configurable weapons/ammo for each zone
  • Configurable to match vehicles to fraction colors
  • Gangwar is taking place in another dimension.
  • Capturable flags
  • Adjustable notification event
  • Protected from duping weapons
  • Custom Loadouts a player can select
  • Passive and rewards and rewards when winning
  • ESX events and prefix customizable
  • Low performance consumption idle (0.0ms - 0.01ms)

Requirements

  • mk_progressbar

Updated Showcase: Click me
Old Showcase: Click me
Buy: Click me (Secured by FiveM Escrow System)

Config Snippets:

MK = MK or {}
MK.Functions = MK.Functions or {}

MK.Language = "en"

MK.UseNewESX = false
MK.ESXResourceName = 'es_extended'

MK.ESXSharedObject = 'esx:getSharedObject'
MK.ESXPlayerDeath = 'esx:onPlayerDeath'
MK.ESXRestoreLoadout = 'esx:restoreLoadout'
MK.ESXReviveEvent = 'esx_ambulancejob:revive'
MK.ESXSetJob = 'esx:setJob'

-- If you add a New Zone do not forget to create the SQL entry in the mk_gangwar table
MK.Zones = {
    ["Skater Park"] = {
        ["location"] = vector3(-914.51,-749.83, 19.85),
        ["zonescale"] = 250.0,
        ["attackerspawn"] = vector3(-1454.646, -281.3966, 46.945671),
        ["defenderspawn"] = vector3(-361.8605, -859.781, 31.46606),
        ["attackerveh"] = vector3(-1459.929, -288.3345, 46.852996),
        ["attackervehspawn"] = vector3(-1459.929, -288.3345, 46.852996), -- Defines the location where the vehicle spawns
        ["defenderveh"] = vector3(-361.0407, -849.1009, 31.62483),
        ["defendervehspawn"] = vector3(-361.0407, -849.1009, 31.62483), -- Defines the location where the vehicle spawns
        ["flags"] = {
            vector3(-1076.124, -679.3151, 21.340147),
            vector3(-959.2398, -602.5271, 20.445716),
            vector3(-894.3693, -636.6524, 27.849752),
            vector3(-936.9094, -718.0965, 20.440155),
            vector3(-824.1545, -759.5375, 22.115724)
        },
        ["Weapons"] = {
            { weapon = 'weapon_pistol', ammo = 9999 },
            { weapon = 'weapon_gusenberg', ammo = 9999 },
            { weapon = 'weapon_advancedrifle', ammo = 9999 },
            { weapon = 'weapon_knife', ammo = 9999 },
        }
    },
}

MK.minOnlineMembers = 0 -- Minimum members of each fraction that need to be online

MK.Gangwartime = 12 -- Time how long a Gangwar will take

-- Overtime in minutes
MK.Overtime = 5

-- Time before respawn in seconds
MK.Respawntime = 10

-- Time between two gangwars in minutes
MK.CooldownTime = 0

-- Max. amount of zones one job can own
-- Set to -1 to disable
MK.MaxOwnedZones = 4

-- The price to pay to buy an unowned area
MK.BuyAreaPrice = 1000

-- Notify everyone on server when gangwar starts and ends
MK.NotifyEveryone = true

-- If set to true the previous attacker isn't able to start the next gangwar
MK.BlockLastStarter = false

-- Duration in minutes until all gangwar vehicles get deleted
MK.DeleteVehicleIntervall = 2

-- Shows scoreboard after the end of the round
MK.ShowScoreboardAfterRound = true

-- With this command users can show the last scoreboard stats
-- Set to nil to disable
MK.ShowLastScoreboardCommand = 'showlastscoreboard'

-- Define the position of the default ESX menu
MK.MenuPosition = 'bottom-right'

MK.UseJobPlates = {
    Enabled = true, -- If enabled every job will have its own plate
    UsePlate = 'GW' -- This plate will be used when UseJobPlates is disabled
}

-- Defines if players outside the gangwar zone are allowed to shoot
MK.DisableShootingOutsideZone = true

--Jobs for GW
MK.JobConfig = {
    ["bloods"] = { 
        enterloc = vector3(208.5568, -19.31445, 69.896667), -- Location where they can join the Gangwar (Best placed in fraction base/mansion/crib)
        color = 29, -- Color number of vehicles https://pastebin.com/pwHci0xK
        Plate = 'Bloods', -- enabled when setting MK.UseJobPlates to true
        Blip = {
            Sprite = 543,
            Color = 1,
            Scale = 1.0
        }
    },
    ["crips"] = { 
        enterloc = vector3(978.6864, -146.3158, 74.240295),
        color = 66,
        Plate = 'Crips', -- enabled when setting MK.UseJobPlates to true
        Blip = {
            Sprite = 543,
            Color = 3,
            Scale = 1.0
        }
    },
}


-- Configure the blip of the flags
MK.FlagBlips = {
    Sprite = 38,
    Color = 1,
    Scale = 1.0,
    Text = 'FLAG'
}

-- Blip for areas without an owner
MK.StandardBlip = {
    Sprite = 543,
    Color = 4,
    Scale = 1.0
}

-- Time in seconds it takes to capture a flag
MK.FlagCaptureTime = 15

-- Available vehicles in the gangwar garage
-- Usage type: ["spawnname"] = "Display name"
MK.GangwarVehicles = {
    ["jugular"] = "Jugular",
    ["drafter"] = "Drafter",
    ["revolter"] = "Revolter",
    ["sultan"] = "Sultan",
    ["primo"] = "Primo",
    ["schafter3"] = "Schafter 3",
}

-- Set this to true if the spawned vehicles should be full tuned by default
MK.SpawnVehiclesFulltuned = false

-- Allows players to take the weapons of their inventory in the gangwar
MK.UseOwnLoadout = true

-- Enables/disables infinite ammo in a running gangwar
MK.InfiniteAmmo = false

-- If enabled all players are able to see the gangwar blips
MK.EveryoneBlips = true

-- Allows player to use a custom loadout in gangwar
MK.CustomLoadout = {
    Enabled = true,
    AllowedWeapons = {
        { value = 'weapon_advancedrifle', label = 'Advanced Rifle' },
        { value = 'weapon_pistol', label = 'Pistol' },
        { value = 'weapon_gusenberg', label = 'Gusenberg Sweeper' },
        { value = 'weapon_carbinerifle', label = 'Carbine Rifle' },
        { value = 'weapon_specialcarbine', label = 'Spezial Carbine Rifle' },
        { value = 'weapon_assaultrifle', label = 'Assault Rifle' },
        { value = 'weapon_knife', label = 'Knife' },
    }
}

MK.HealAfterKill = {
    Enabled = true,
    FillArmor = true
}

MK.Markers = {
    JoinGangwar = {
        MarkerType = 20,
        Scale = { x = 0.8, y = 0.8, z = 0.8 },
        Color = { r = 190, g = 0, b = 0, alpha = 140 }
    },
    StartGangwar = {
        MarkerType = 42,
        Scale = { x = 1.0, y = 1.0, z = 1.0 },
        Color = { r = 190, g = 0, b = 0, alpha = 140 }
    },
    Flag = {
        MarkerType = 4,
        Scale = { x = 1.0, y = 1.0, z = 1.0 },
        Color = { r = 190, g = 0, b = 0, alpha = 140 }
    },
    Garage = {
        MarkerType = 36,
        Scale = { x = 1.5, y = 1.5, z = 1.5 },
        Color = { r = 190, g = 0, b = 0, alpha = 140 }
    },
    GangwarZone = {
        MarkerType = 28,
        Color = { r = 190, g = 0, b = 0, alpha = 140 }
    }
}

-- Command to leave a gangwar
-- Set it to '' to disable the command
MK.LeaveGangwarCommand = 'leavegangwar'

-- Command to surrender a running gangwar
-- Set it to '' to disable the command
MK.SurrenderGangwarCommand = 'surrender' -- not functional now, coming in one of the next versions ;)

MK.SurrenderGangwar = {
    Enabled = true,
    NeedsMajority = true, -- If true, more than 50% of the team needs to execute the surrender command, if false only one needs to execute it
}

--Notification handling
MK.Notify = function(type, message)
    if type == 'success' then
        ESX.ShowNotification(message, 4000, 'success')
    elseif type == 'warning' then
        ESX.ShowNotification(message, 4000, 'error')
    elseif type == 'error' then
        ESX.ShowNotification(message, 4000, 'error')
    elseif type == 'info' then
        ESX.ShowNotification(message, 4000, 'info')
    end
end

-- You can use your own help notification here
MK.HelpNotification = function(message)
    ESX.ShowHelpNotification(message)
end

-- Gets called after a player in a running gangwar gets revived
MK.OnPlayerRevive = function()
   
end

MK.HealAndVestKeybinds = true

MK.HealKeybind = 'PERIOD'

MK.VestKeybind = 'COMMA'

-- This enables flag capturing
MK.UseFlags = true

-- Amount of points the team gets for capturing a flag
MK.FlagCapturePoints = 5

-- Amount of points the team gets for killing an enemy
MK.KillPoints = 3

-- Randomly picks one of the reward categories (e.g. the top three or the bottom three)
-- Remove the second one if it shouldn't be random - You can add as many categories as you want to increase the randomness
MK.Rewards = {
    {
        { type = 'item', name = 'medikit', amount = 1 }, -- Gives the player 1 medikit item
        { type = 'weapon', name = 'weapon_pistol', amount = 100 }, -- Gives the player 1 pistol with 100 ammo
        { type = 'money', account = 'money', amount = 10 }, -- Adds the player 10 $ (accounts: money, bank, black_money)
    },
    {
        { type = 'item', name = 'kevlar', amount = 1 }, -- Gives the player 1 kevlar item
        { type = 'weapon', name = 'weapon_knife', amount = 100 }, -- Gives the player 1 knife
        { type = 'money', account = 'black_money', amount = 5 }, -- Adds the player 10 $ black money (accounts: money, bank, black_money)
    }
}

-- Randomly picks one of the reward categories (e.g. the top three or the bottom three)
-- Remove the second one if it shouldn't be random - You can add as many categories as you want to increase the randomness
MK.PassiveRewards = {
    period = 60, --- Every 60 Minutes Gangwar owners get passive reward. Only configurable in minutes
    enabled = true, -- Enable/disable feature
    items = {
        {
            { type = 'item', name = 'medikit', amount = 1 }, -- Gives the player 1 medikit item
            { type = 'weapon', name = 'weapon_pistol', amount = 100 }, -- Gives the player 1 pistol with 100 ammo
            { type = 'money', account = 'money', amount = 10 }, -- Adds the player 10 $ (accounts: money, bank, black_money)
        },
        {
            { type = 'item', name = 'kevlar', amount = 1 }, -- Gives the player 1 kevlar item
            { type = 'weapon', name = 'weapon_knife', amount = 100 }, -- Gives the player 1 knife
            { type = 'money', account = 'black_money', amount = 5 }, -- Adds the player 10 $ black money (accounts: money, bank, black_money)
        }
    }
}

MK.Functions.ShowProgressbar = function(label, time, cb)
    TriggerEvent("mk_progressbar:client:progress", {
        name = "capture_flag",
        duration = time,
        label = label,
        useWhileDead = false,
        canCancel = true,
        controlDisables = {
            disableMovement = true,
            disableCarMovement = true,
            disableMouse = false,
            disableCombat = false
        }
    }, function(status)
        cb(status)
    end)
end

MK.Functions.CancelProgressbar = function()
    TriggerEvent('mk_progressbar:client:cancel')
end

MK.Functions.OnPlayerJoinedGangwar = function()

end

Code is accessible No
Subscription-based No
Lines (approximately) LUA: ~1600 UI: ~600
Requirements mk_progressbar
Support Yes
3 Likes

Gangwar 1.1 Update with new features is out now!

New Updated Features

  • More options to customize
  • Webhook for area overview
  • K/D HUD
  • Scoreboard to see all KDs

qbcore?