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.
Manual SQL Entries
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.
qb-core\server\functions.lua
This example shows how to add the export for item tax defined in the config.
qb-inventory\server\main.lua
EXPORTS
These are available exports in the resource - use them as you please and find necessary.
This export can be used in your scripts that you want to include tax on in which you have added in the config.
This is where you would find the label that you would be defining in the export from the new tax type you added.
This export can be used in your scripts to get the amount of tax in percentage.
This export can be used in your scripts to add funds to the cityhall.
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.
Manual SQL Entries
SOCIETY CHANGES
EXAMPLE BELOW
fxmanifest.lua
This example shows how to add the trigger to es_extended\server\paycheck.lua for income tax support.
This example shows how to add the export for item tax defined in the config, this example is for esx_shops.
This example shows how to add the export for item tax defined in the config.
ox_inventory\modules\shops\server.lua
EXPORTS
These are available exports in the resource - use them as you please and find necessary.
This export can be used in your scripts that you want to include tax on in which you have added in the config.
This is where you would find the label that you would be defining in the export from the new tax type you added.
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".
local tax = "Item"
exports['ap-government']:TaxAmounts(tax)
local tax, amount = "Item", 200
exports['ap-government']:addCityhallFunds(tax, amount)
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.