Config Preview
Tax = {} -- don't touch
Locale = {} -- don't touch
--[[
_____ ___ ___ ____ _____ ______ ______ _______ _____ _______ _________ ______
|_ _| .' `.|_ ||_ _| |_ _|.' ____ \ .' ___ ||_ __ \ |_ _||_ __ \ | _ _ |.' ____ \
| | / .-. \ | |_/ / | | | (___ \_|/ .' \_| | |__) | | | | |__) ||_/ | | \_|| (___ \_|
| | _ | | | | | __'. | | _.____`. | | | __ / | | | ___/ | | _.____`.
_| |__/ |\ `-' /_| | \ \_ _| |_ | \____) |\ `.___.'\ _| | \ \_ _| |_ _| |_ _| |_ | \____) |
|________| `.___.'|____||____||_____| \______.' `.____ .'|____| |___||_____||_____| |_____| \______.'
_____ ___ ___ ____ _____ _________ _ ____ ____
|_ _| .' `.|_ ||_ _| |_ _| | _ _ | / \ |_ _||_ _|
| | / .-. \ | |_/ / | | |_/ | | \_| / _ \ \ \ / /
| | _ | | | | | __'. | | | | / ___ \ > `' <
_| |__/ |\ `-' /_| | \ \_ _| |_ _______ _| |_ _/ / \ \_ _/ /'`\ \_
|________| `.___.'|____||____||_____| |_______| |_____||____| |____||____||____|
--]]
-- READ THE DOCUMENTATION FOR MORE INFO
-- OPEN A TICKET IF YOU NEED MORE HELP
-- 0.0075 = 0.75%
-- Framework is detected automatically. Compatible are ESX, QB-Core and QBOX
------------------------ General -------------------
Tax.Locale = 'en' -- Available Translations: en, de
Tax.Currency = 'โฌ' -- โฌ/$/ยฃ or whatever
Tax.CreateTables = true -- This creates the needed database tables for you on first startup
Tax.TaxReturns = true -- if true, players can file a tax return every X days to receive back X amount of their paid taxes
Tax.ReturnRate = 0.05 -- 5% of paid taxes can be claimed
Tax.ReturnTime = 30 -- Time in days how often a player can file their tax return
Tax.DeleteExpiredReturns = true -- if true players can only claim money for taxes paid within the last Tax.ReturnTime amount of days
Tax.PedCoords = vector4(-547.1, -209.6, 37.6, 300.0)
Tax.PedModel = 's_f_y_airhostess_01'
Tax.Blip = 207
Tax.BlipColor = 25
Tax.OxTarget = true -- uses OxTargets support for QB-Target. If this results in any issues, let me know
-------------------- Webhook / Logs ----------------
Tax.Webhook = true
Tax.WebhookLink = 'webhook link'
------------------------- Jobs ---------------------
---- Jobs and grades that are allowed to use the commands. You can add more yourself. If the grade is 1, everyone with grade 1 or higher can use it.
---- If any is true, everyone can use the command. If Owner is true, the Owner and the provided jobs can use it.
---- If any is true it will overwrite the setting for owner
Tax.AllowedJobsTitleVehicle = {
any = false,
owner = false,
police = 3,
mechanic = 4,
}
Tax.AllowedJobsRegisterVehicle = {
any = false,
owner = false,
mechanic = 4,
}
Tax.AllowedJobsUnRegisterVehicle = {
any = false,
owner = false,
mechanic = 4,
}
Tax.AllowedJobsCheckVehicle = {
any = false,
owner = true,
police = 3,
mechanic = 4,
}
Tax.AllowedJobsCheckPrice = {
any = true,
owner = true,
}
Tax.AllowedJobsUpdateVehicleOwner = {
any = false,
owner = false,
police = 3,
mechanic = 4
}
------------------------- Menu ---------------------
Tax.MenuPosition = 'bottom-right' -- top-left | top-right | bottom-left | bottom-right | center
Tax.MaxDistance = nil -- max distance to vehicle for actions. Set to nil to deactivate
Tax.MenuCommand = 'vehiclemenu' -- both command and keybind can be used to open the menu
Tax.MenuDefaultKey = 'f5'
Tax.OxLib = true -- if true, uses ox_lib menu instead of esx_menu_deafult / qb-menu
----------------------- Fixed Taxes ----------------
Tax.EnableFixedTaxes = false
Tax.FixedTaxes = { -- These are fixed additional fees that every player has to pay, you can add as many as you want. A new column in the users/players table will be created for the interval
phoneBill = { -- will be the name of the column in the database, so chose something that does not already exist
price = 150, -- what the player has to pay
interval = 7, -- after how many days does this have to be paid
jobs = { -- you can change the price for individial jobs for example if you want police officers to pay less
},
society = 'society_unemployed', -- The society/company that should receive the money
societyName = "Phone provider",
},
healthInsurance = {
price = 300, -- what the player has to pay
interval = 7, -- after how many days does this have to be paid
jobs = { -- you can change the price for individial jobs for example if you want police officers to pay less
{job = 'police', price = 200},
{job = 'off_police', price = 200}, -- remember to also add off-duty jobs if they exist
{job = 'ambulance', price = 150}
},
society = 'society_unemployed', -- The society/company that should receive the money
societyName = "Health insurance",
}
}
------------------- Capital (bank account) ---------
Tax.EnablePercentualIncomeTax = false -- percentual tax on every paycheck the player receives. loki_jobtime is needed for this to work
Tax.PercentualIncomeTax = 0.1 -- 10% of the players paycheck
Tax.EnableFixedIncomeTax = false -- fixed amount tax on every paycheck the player receives. loki_jobtime is needed for this to work
Tax.FixedIncomeTax = 500 -- fixed 500$ tax, even for jobs without any payout (like criminals to make it fair, but less realistic)
Tax.EnablePercentualCapitalTax = true
Tax.PercentualCapitalTax = 0.005
Tax.EnableFixedCapitalTax = true
Tax.FixedCapitalTax = 500
Tax.EnablePercentualCompanyTax = true -- Tax on campany accounts
Tax.PercentualCompanyTax = 0.005
Tax.EnableFixedCompanyTax = true
Tax.FixedCompanyTax = 5000
Tax.ExcludedCompanys = {'society_police'} -- here you can add societys that should not receive tax
Tax.CapitalInterval = 7
Tax.CapitalRandomInterval = 2 -- This will set the interval to a random number reaching from 5 to 9. So the interval minus the random factor to the interval plus the random factor.
-- Set to 0 to deactivate and just use the set interval. This is to prevent players cashing out everything shortly before the tax has to be paid.
------------------------ Vehicles ------------------
Tax.Dealership = 'qb-vehicleshop' -- Available dealership systems: lc_dealership, okokVehicleShop, myCardealer, qb-vehicleshop, esx_vehicleshop, custom
-- esx_vehicleshop will work with every script that uses the "vehicles" table and qb-vehicleshop works with every script that uses the qb-core/shared/vehicles.lua (including qbx_vehicleshop)
Tax.EnablePercentualVehicleTax = true
Tax.PercentualVehicleTax = 0.0075
Tax.EnableFixedVehicleTax = false
Tax.FixedVehicleTax = 100
Tax.VehicleInterval = 7
Tax.ImpoundVehicleIfNotPaid = false -- loki_impound is required. Vehicle will be impounded if player cant pay the vehicle tax
Tax.Impound = 'Police' -- The Impound where the vehicle goes, if impounded
Tax.DefaultPrice = 50000 -- This price is used if the vehicle could not be found in your dealership system
Tax.NotifyOnDefualtPrice = true -- this will print in the console whenever the default price is used
Tax.SyncVehicles = false -- use this and/or the documented exports, if you want every vehicle to be synced to the registered_vehicles
Tax.AlwaysRegister = false -- only relevant if Tax.SyncVehicles is true. If this is true, every synced vehicle will always be registered
function CustomDealership(hash, price) -- This function has to return the price of the vehicle
MySQL.Async.fetchAll('SELECT price from dealership_vehicles WHERE hash = @hash LIMIT 1', {
['@hash'] = hash
}, function(result)
price = result[1].price
return price
end)
-- This is an example of how you could write this for your custom dealership script. Please edit it to fit your script.
end
------------------- Vehicle Certificates -----------
Tax.RegistrationCertificates = true -- allow to create vehicle certificate documents
Tax.CertificateStyle = 'us' -- available styles of certificates: de (Zulassungsbescheinigung Teil I), us (california certificate of title). If you want to see more, let me know
Tax.CertificateItem = "fahrzeugschein" -- insert the name of the item here, after setting it up in your inventory/framework
Tax.Inventory = "ox_inventory" -- available inventorys: qs-inventory, ox_inventory, qb-inventory
----------------------- Property -------------------
Tax.Housing = 'custom' -- Available housing systems: qs-housing, loaf_housing, qb-houses, custom
Tax.EnablePercentualPropertyTax = false
Tax.PercentualPropertyTax = 0.0075
Tax.EnableFixedPropertyTax = false
Tax.FixedPropertyTax = 100
Tax.PropertyInterval = 7
function CustomHousing(license, tax) -- edit this code to fit your housing script. Remeber to add the column lastPay to your housing table with the format DATE and default CURDATE()
local houseID = nil
MySQL.Async.fetchAll('SELECT * FROM housing WHERE owner = @owner AND lastPay < DATE_SUB(NOW(), INTERVAL @interval DAY)', {
['@interval'] = Tax.Interval,
['@owner'] = license
}, function(resulthouses)
for k, v in pairs(resulthouse) do
houseID = v.houseId
tax = tax + math.ceil(v.price * Tax.PropertyTax)
MySQL.Async.execute('UPDATE housing SET lastPay = CURDATE() WHERE houseId = @id', {
['@id'] = houseID
})
end
end)
return tax
-- This is an example of how you could write this for your custom shop system. Please edit it to fit your script.
end
------------------------- Shops --------------------
Tax.Shop = 'custom' -- available systems: okokShop, custom
Tax.EnablePercentualShopTax = false -- percentual tax on the price of the shop
Tax.PercentualShopTax = 0.0075
Tax.EnableFixedShopTax = false -- fixed tax on the shop
Tax.FixedShopTax = 500
Tax.EnableAccountShopTax = false -- percentual tax on the current money on the shops account
Tax.AccountShopTax = 0.0075
Tax.ShopInterval = 7 -- interval in days
function CustomShop(source) -- only if you use a custom shop
local identifier = '' -- you have to get the identifier
MySQL.Async.fetchAll('SELECT * FROM shops WHERE owner = @owner AND lastPay < DATE_SUB(NOW(), INTERVAL @interval DAY)', {
['@owner'] = identifier,
['@interval'] = Tax.ShopInterval
}, function(result)
for k, v in pairs(result) do
tax = tax + (v.price * Tax.PercentualShopTax) + Tax.FixedShopTax + (v.accountMoney * Tax.AccountShopTax)
MySQL.Async.execute('UPDATE shops SET lastPay = CURRENT_TIMESTAMP() WHERE shopId = ?', {v.shopId})
end
end)
return tax
-- This is an example of how you could write this for your custom shop system. Please edit it to fit your script.
end
--------------------- Gas Stations -----------------
Tax.GasStation = 'custom' -- abailable systems: okokGasStation, lc_gas_stations, custom
Tax.EnablePercentualGasTax = false -- percentual tax on the price of the gas station
Tax.PercentualGasTax = 0.0075
Tax.EnableFixedGasTax = false -- fixed tax on the gas station
Tax.FixedGasTax = 500
Tax.EnableAccountGasTax = false -- percentual tax on the current money on the gas stations account
Tax.AccountGasTax = 0.0075
Tax.GasInterval = 7 -- interval in days
function CustomGasStation(source) -- only if you use a custom shop
local identifier = ''
MySQL.Async.fetchAll('SELECT * FROM gasStations WHERE owner = @owner AND lastPay < DATE_SUB(NOW(), INTERVAL @interval DAY)', {
['@owner'] = identifier,
['@interval'] = Tax.ShopInterval
}, function(result)
for k, v in pairs(result) do
tax = tax + (v.price * Tax.PercentualGasTax) + Tax.FixedGasTax + (v.accountMoney * Tax.AccountGasTax)
MySQL.Async.execute('UPDATE gasStations SET lastPay = CURRENT_TIMESTAMP() WHERE id = ?', {v.id})
end
end)
return tax
-- This is an example of how you could write this for your custom shop system. Please edit it to fit your script.
end
------------------------ Billing -------------------
Tax.Billing = 'none' -- Available billing systems: zapps_billing, esx_billing, okokBilling, qb (phone app), renewed-banking (qbox), ps-banking, none (just remove money from acc), custom
Tax.TaxSociety = 'society_police' -- The society that will receive the cash. For ESX it is usually society_jobname, for qb/qbox it is usually just the jobname.
Tax.TaxSocietyName = 'IRS' -- The name of the society that will receive the money
Tax.TaxSenderName = 'IRS' -- The name of who issued the invoice
Tax.TaxDaysToPay = 7 -- How many days do the players have to bay the bill (zapps_billing only)
---- Write your custom billing system here if you wish to use your own
function CustomBilling(receiver, tax, plate, source, taxType, society, societyName)
-- Receiver is the license of the user who has to pay
-- You know what xPlayer is
-- tax is the ammount the player has to pay
-- plate is the vehicle plate. If the bill is for property tax, plate will be nil
-- currentID is the server ID of the player
-- Type is capital, property or vehicle depending on where it comes drom
-- society and societyName are for fixed taxes with own specified societys, nil for other taxes
print('customBilling')
end
---------------------- Notifications ---------------
Tax.Notification = 'lib' -- Available notification systems: okokNotify, esx, lib (ox_lib), RiP-Notify, qb, wasabi_notify, mythic_notify, sy_notify, custom
---- Write your custom Notify system here if you wish to use your own
function CustomNotify(type, msg, heading, source)
-- Your Custom function goes here
-- Used types are error, success and info
-- msg is the displayed notification text
-- heading is for systems like okokNotify with headings on the notification. Just dont use it if your system does not have one.
-- currentID is the server ID of the player that gets the notification
print('customNotify')
end
Last updated