BK Development
BKStoreDiscord
  • 💿FiveM Escrow System
  • SCRIPTS
    • 🏛️bk_politicalsystem
      • Dependencies
      • Installation
      • Configuration
      • Exports
      • RP
Powered by GitBook
On this page

Was this helpful?

  1. SCRIPTS
  2. bk_politicalsystem

Installation

PreviousDependenciesNextConfiguration

Last updated 8 months ago

Was this helpful?

  1. Install 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 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. Start/Restart your server.

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.

After downloading, extract bk_politicalsystem.

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

  2. 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} } },
  1. 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
  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;
  1. Start/Restart your server.

  1. Go to your FiveM keymaster and download bk_politicalsystem.

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

  3. Go to configs/config.lua and put your framework to 'custom'

  4. 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

  5. Insert the SQL files of the script to your database.

  6. Start/Restart your server.

If you want to use the tax system, follow the installation guide provided .

Install required to run the script.

Go to your and download bk_politicalsystem.

If you want to use the tax system, follow the installation guide provided .

If you want to use the tax system, follow the installation guide provided .

For support, join our .

🏛️
all dependencies
FiveM keymaster
here
all dependencies
FiveM keymaster
here
here
discord