Installation
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.
Go to your FiveM keymaster and download
bk_politicalsystem
.
After downloading, extract
bk_politicalsystem.
Drag and drop
bk_politicalsystem
into your resources directory and add it in yourserver.cfg
.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
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,'{}','{}');
If you want to use the tax system, follow the installation guide provided here.
Start/Restart your server.
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.
Go to your FiveM keymaster and download
bk_politicalsystem
.
After downloading, extract
bk_politicalsystem.
Drag and drop
bk_politicalsystem
into your resources directory and add it in yourserver.cfg
.Add the job to qb-core/shared/jobs.lua.
politician = { label = 'Politician', defaultDuty = true, offDutyPay = false, grades = { ['0'] = { name = 'Deputy', payment = 750}, ['1'] = {name = 'Chairman of the parliament', payment = 1500}, ['2'] = {name = 'President', payment = 2500, isboss = true} } },
Configure your script.
Be sure to configure your script:
onfig.Framework = 'qb' -- 'qb', 'esx', 'custom' -- setup custom in bridges/custom/custom_bridge.lua Config.Phone = '' -- options: 'qb-phone', 'quasar', 'gksphone', 'lbphone', 'yflip', 'custom' -- for mail -- setup custom in config/sv_customizable_functions.lua Config.Interface = { Menu = '', -- options 'qb', 'ox', 'custom' -- editable in cl_customizable_functions.lua Input = '', -- 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
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;
If you want to use the tax system, follow the installation guide provided here.
Start/Restart your server.
Go to your FiveM keymaster and download bk_politicalsystem.
Drag and drop bk_politicalsystem into your resources directory and add it in your server.cfg.
Go to configs/config.lua and put your framework to 'custom'
Go to bridges/custom/sv_custom_bridge.lua and cl_custom_bridge.lua and setup your custom framework there based on the esx/qb bridge
Insert the SQL files of the script to your database.
If you want to use the tax system, follow the installation guide provided here.
Start/Restart your server.
For support, join our discord.
Last updated