Installation

  1. Install all dependencies required to run the script.

Before installing, check if you already have them, because they are usually installed by default.

NOTE: Be sure that you have the latest versions of the dependencies.

  1. Go to your FiveM keymaster and download bk_politicalsystem.

After downloading, extract bk_politicalsystem.

  1. Drag and drop bk_politicalsystem into your resources directory and add it in your server.cfg.

  2. Configure your script.

Be sure to configure these options:

Config.Framework = 'esx' --  'qb', 'esx', 'custom' -- setup custom in bridges/custom/custom_bridge.lua

--[[
    Only required if Config.Framework = 'esx'
    Options:
        'new' -- v1.8.5-latest
        'old' -- v1 - v.1.8.5
]]
Config.ESXVersion = 'new'

Config.Phone = '' -- options: 'qb-phone', 'quasar', 'gksphone', 'lbphone', 'yflip', 'custom' -- for mail -- setup custom in config/sv_customizable_functions.lua

Config.Interface = {
    Menu = 'ox', -- options 'qb', 'ox', 'custom' -- editable in cl_customizable_functions.lua
    Input = 'ox', -- options 'qb', 'ox', 'custom' -- editable in cl_customizable_functions.lua
    Notifications = '', -- options 'esx', 'qb', 'ox', 'custom' -- editable in cl_customizable_functions.lua
    TextUI = '' -- options 'esx', 'qb', 'ox', 'custom' -- editable in cl_customizable_functions.lua
}

Config.Zones = '' -- options 'PolyZone', 'ox', 'custom' -- editable in cl_customizable_functions.lua

Config.Target = false  -- true/false
  1. Insert the SQL files of the script to your database.

CREATE TABLE IF NOT EXISTS `bk_candidates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `votes` bigint(20) DEFAULT 0,
  `verified` varchar(100) NOT NULL DEFAULT '0',
  `description` varchar(100) NOT NULL,
  `owner` varchar(100) NOT NULL,
  `ownercid` varchar(255) NOT NULL,
  `members` varchar(100) DEFAULT '[]',
  `electionsban` tinyint(1) unsigned zerofill DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS `bk_elections` (
  `title` varchar(255) DEFAULT NULL,
  `date` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS `bk_laws` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT 'Law',
  `text` longtext NOT NULL DEFAULT 'Law Text',
  `date` varchar(20) NOT NULL DEFAULT 'unknown',
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

CREATE TABLE IF NOT EXISTS `bk_votes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `identifier` varchar(255) NOT NULL,
  `votedFor` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

INSERT INTO `jobs` (name, label) VALUES
    ('politician', 'Politician');

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
    ('politician',0,'deputy','Deputy',200,'{}','{}'),
    ('politician',1,'chairman','Chairman of the Parliament',300,'{}','{}'),
    ('politician',2,'president','President',500,'{}','{}');
  1. If you want to use the tax system, follow the installation guide provided here.

  2. Start/Restart your server.

For support, join our discord.

Last updated