QBCORE GOV INSTALLATION

3 min readLast updated

QBCORE DEPENDENCIES

DependencyInstallDescription
QB-TargetOptional if using other target system stated. For use of using 3rd eye features.
QB-MENURequiredThis normally is included in the QBCore install so check if you have before downloading.
QB-INPUTRequiredThis normally is included in the QBCore install so check if you have before downloading.
QB-MANAGEMENTRequiredThis normally is included in the QBCore install so check if you have before downloading.

STEP BY STEP

1

Extract the Resource

Extract the ap-government.zip file into your server’s resources folder. Ensure the folder is named ap-government.

2

Install & Ensure Dependencies

Install all required dependencies for the resource and make sure they are started before ap-government.

lua
1
ensure ap-government
3

Import the SQL File

Locate the included .sql file and import it into your database using a tool such as phpMyAdmin or Adminer.

4

Configure the Script

Open the config.lua file and set it up to match your server. Make sure to: Enable the correct target system you are using (e.g. ox_target / qb-target) If you are using a custom target system via target.lua, ensure the default target options in config.lua are set to false Adjust any additional settings as needed

5

Restart Server

Restart your server to apply all changes.

SQL

Warning

Please note, there is an SQL file. You will need to import it in order for the script to run. You can open the respective SQL file, copy the queries and execute/run them in your database manually (my personal preferred way) or you can import the file.

sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CREATE TABLE IF NOT EXISTS `ap_appointments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(100) DEFAULT NULL,
  `name` tinytext DEFAULT NULL,
  `appData` longtext DEFAULT NULL,
  `type` varchar(60) DEFAULT NULL,
  `state` int(11) DEFAULT 0,
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `ap_dlcsettings` (
  `script` varchar(60) DEFAULT 'SCRIPT',
  `settings` longtext DEFAULT '{}',
  `other` longtext DEFAULT '{}',
  `id_storage` longtext DEFAULT '{}'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

INSERT INTO `ap_dlcsettings` (`script`, `settings`, `other`, `id_storage`) VALUES
	('ap_voting', '{"currentType":0,"voteState":0,"funds":10000}', '{"Item":0.7,"Vehicle":0.2,"Business":0.15,"Housing":0.2,"Income":0.15}', '{}');
	
CREATE TABLE IF NOT EXISTS `ap_tax` (
  `business` varchar(60) DEFAULT 'JOB NAME',
  `label` varchar(60) DEFAULT 'JOB LABEL',
  `amount_owed` int(11) DEFAULT 0,
  `total_tax_paid` int(11) DEFAULT 0,
  `owner` varchar(60) DEFAULT 'COMPANY OWNER',
  `base_tax` int(11) DEFAULT NULL,
  `grants` longtext DEFAULT 'nil'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

CREATE TABLE IF NOT EXISTS `ap_voting` (
  `identifier` varchar(100) DEFAULT NULL,
  `name` varchar(70) DEFAULT NULL,
  `age` text DEFAULT NULL,
  `shortDescription` mediumtext DEFAULT NULL,
  `whyDoYouWantToBeACandidate` longtext DEFAULT NULL,
  `WhatYoullBringToTheCity` longtext DEFAULT NULL,
  `denied` longtext DEFAULT 'N/A',
  `votes` int(10) DEFAULT NULL,
  `state` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;lua

CONFIGURATION

Info

CLICK THE TABS TO SEE OPTIONS

This example shows how to add the trigger to qb-core\server\functions.lua for income tax support.

lua
1
TriggerEvent('ap-government:server:systemTax', Player.PlayerData.source, "Player", payment)

EXPORTS

Info

These are available exports in the resource - use them as you please and find necessary.

Info

This export can be used in your scripts that you want to include tax on in which you have added in the config.

lua
1
2
3
4
5
exports['ap-government']:chargeCityTax(source, label, amount, type)
-- source; source of the player the tax will be deducted from.
-- label; this is the key of the type of tax you have added in the Config.Tax.MayorControl.
-- amount; this would be the amount of which the item/housing/vehicle cost.
-- type; this is for the type of money to be deducted e.g "cash" or "bank".

Was this page helpful?

© 2026 AP Scripts. Engineered for excellence.