Installations

Dependencies

You need the fivem-mysql-async

MySQL

Copy the MySQL code and paste it into your database.

CREATE TABLE `gangwar` (
  `id` int(11) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `owner` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

server.cfg

Add the command to your server.cfg file and make sure that the script is started.

ensure mt_gangwar

config.lua

You can add jobs in the configuration and connect the Discord webhooks.

config = {}

config.zone = {
    ["Police"] = {
        ["coorde"] = vector3(324.81,-2032.17,20.86),
        ["distance"] = 100.0,
    },
    ["Windpark"] = {
        ["coorde"] = vector3(2346.5, 2548.392, 46.65198),
        ["distance"] = 100.0,
    },
    -- You have the option to add multiple zones here.
}

config.gangcolor = {
    ["LSPD"] = {"",11},
    ["Mechanic"] = {"",4},  
    -- And here you can add the colors for the blips.
}

config.gangrespawn = {
    ["LSPD"] = vector3(459.73,-990.87,30.69),
    ["Mechanic"] = vector3(1393.1511,1138.2216,114.4433),
    -- Here you can set the respawn points for the gangs.
}

config.gangblacklist = {
    "unemployed"
    -- Here you can either join the gangs or add the jobs, but participating in both is not allowed.
}

config.rewards = {
    {
        name = "medikit",
        amount = 1
    },
}

config.discordWebhookUrl = ''
config.erobertegebiete = "Captured Territories"
config.discrodtext = " has won the territory!"

config.enableBlips = true  -- Displays gang wars on the map, set to false if not desired

config.cooldownZeit = 120 -- Time to wait before starting the next gang war

config.gangrespawntime = 5000  -- Respawn Time

config.gangwarZeit = 5 -- Duration of a gang war in minutes

config.punt = 3 -- Score received for killing someone

config.grade = 1 -- Minimum rank required for a player to start the gang war

config.player = 1 -- Minimum number of players required online to start the gang war

config.notifications = "notifications" 

config.color = "#673ab7" -- This is the notification color.

config.titel = "Gangwar" -- This is the title of the notification.

-- These are the notification settings for various messages.
config.key = "Press the 'E' key to attack the gang war!"

config.gehort = "This territory already belongs to your faction!"
config.gange = "A gang war is already in progress..."
config.online = "There must be at least 3 members online from each faction!"
config.begonnen = "You have recently started a gang war!"
config.rang = "You must be at least rank 3 to start the gang war!"
config.start = "Please wait 10 minutes before starting a new gang war!"
config.toten = "+3 points for killing an enemy!"
config.mitoten = "-3 points for killing a faction member!"
config.gleichstand = "Tie game! +5 minutes"

config.winningNotification = 'You have won the gang war against %s and now own the zone "%s".'
config.losingNotification = 'You have lost the gang war against %s and no longer own the zone "%s".'
config.attackNotification = 'Your gang war territory "%s" is under attack!'
config.globalNotification = 'The gang war zone "%s" of faction %s is being attacked by %s!'

Discord Webhooks

Getting started with Discord webhooks: You can connect your Discord webhooks in the config.lua file.

Do you have questions

You can customize everything else in your config.lua. If you have any questions or encounter difficulties, feel free to contact us on Discord.

Last updated

Was this helpful?