Installation

A guide for installing Possible Gang Wars on your FiveM server.

Important: The resource folder on your server must be named exactly possible_wars. Do not rename it (e.g. possible-wars, wars). Exports and events use that name.

Installation Steps

  1. Drag and drop the possible_wars folder into your [standalone] directory

  2. Run the SQL from /imports/ into your server database:

SQL Copy
CREATE TABLE IF NOT EXISTS `possible_war_requests` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `requester_gang` varchar(50) NOT NULL,
    `target_gang` varchar(50) NOT NULL,
    `wager` int(11) NOT NULL,
    `kills` int(11) NOT NULL,
    `message` text DEFAULT NULL,
    `timestamp` int(11) NOT NULL,
    `expires` int(11) NOT NULL,
    PRIMARY KEY (`id`)
);

CREATE TABLE IF NOT EXISTS `possible_active_wars` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `gang1` varchar(50) NOT NULL,
    `gang2` varchar(50) NOT NULL,
    `wager` int(11) NOT NULL,
    `kill_target` int(11) NOT NULL,
    `gang1_kills` int(11) NOT NULL DEFAULT 0,
    `gang2_kills` int(11) NOT NULL DEFAULT 0,
    `start_time` int(11) NOT NULL,
    `status` varchar(20) NOT NULL DEFAULT 'active',
    PRIMARY KEY (`id`)
);

CREATE TABLE IF NOT EXISTS `possible_war_history` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `gang1` varchar(50) NOT NULL,
    `gang2` varchar(50) NOT NULL,
    `wager` int(11) NOT NULL,
    `kill_target` int(11) NOT NULL,
    `gang1_kills` int(11) NOT NULL,
    `gang2_kills` int(11) NOT NULL,
    `winner` varchar(50) NOT NULL,
    `start_time` int(11) NOT NULL,
    `end_time` int(11) NOT NULL,
    PRIMARY KEY (`id`)
);

CREATE TABLE IF NOT EXISTS `possible_gang_stats` (
    `gang_name` varchar(50) NOT NULL,
    `wars_won` int(11) NOT NULL DEFAULT 0,
    `wars_lost` int(11) NOT NULL DEFAULT 0,
    `total_kills` int(11) NOT NULL DEFAULT 0,
    `total_deaths` int(11) NOT NULL DEFAULT 0,
    `money_earned` int(11) NOT NULL DEFAULT 0,
    `money_lost` int(11) NOT NULL DEFAULT 0,
    PRIMARY KEY (`gang_name`)
);

Compatibility

QBCore, QB & ESX.

Dependencies