AP Government
Documentation & support for AP Government.

QBCore INSTALLATION
QBCORE DEPENDENCIES
Required
This normally is included in the QBCore install so check if you have before downloading.
Required
This normally is included in the QBCore install so check if you have before downloading.
Required
This normally is included in the QBCore install so check if you have before downloading.
STEP BY STEP
Extract ap-government.zip file.
Install and ensure dependencies for the resource.
Inset SQL file into your database.
Setup your config file with how you want it, make sure you enable the target system in the config to the one you use or if you have added another target script in the target.lua make sure the target options are both set to false.
SQL
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.
CONFIGURATION
CLICK THE TABS TO SEE OPTIONS
This example shows how to add the trigger to qb-core\server\functions.lua for income tax support.
TriggerEvent('ap-government:server:systemTax', Player.PlayerData.source, "Player", payment)

EXPORTS
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".

ESX INSTALLATION
STEP BY STEP
Extract ap-government.zip file.
Install and ensure dependencies for the resource.
Inset SQL file into your database.
Setup your config file with how you want it, make sure you enable the target system in the config to the one you use or if you have added another target script in the target.lua make sure the target options are both set to false.
Make changes to esx society, click here for instructions.
SQL
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.
SOCIETY CHANGES
// Open esx society folder and edit fxmanifest.lua
-- add this at the bottem of the manifest. server_exports { 'GetSociety' }
EXAMPLE BELOW

This example shows how to add the trigger to es_extended\server\paycheck.lua for income tax support.
TriggerEvent('ap-government:server:systemTax', xPlayer.source, "Player", salary)

EXPORTS
exports['ap-government']:chargeCityTax(source, label, amount)
-- 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.

Last updated