Free ScriptsRps Taxes
rps_taxes
$0.00
Verifying accountโฆ
Description
๐ธ rps_taxes โ Automatic Bank & Vehicle Tax System
Put a real economy sink on your server. On a timer you choose, every online player is taxed on their bank balance and on the vehicles they own. The money goes into your government, police, EMS or any other society accounts, split however you like.
Players get a notification, a mail on their phone and an entry in their banking app. Staff get a full Discord log of every cycle.
Features
โจ Highlights
- ๐ฆ Bank balance tax โ a percentage of each player's bank balance, with a minimum balance and a max cap
- ๐ Vehicle ownership tax โ a flat amount per owned vehicle, read straight from your framework's vehicle table
- ๐ผ Multi-account revenue split โ send collected tax to several society accounts by percentage
- ๐ฑ Phone integration โ tax notice mail plus a banking-app transaction on lb-phone and qb-phone
- ๐ Discord logging โ queued and throttled, with per-event channels, so it never lags your server
- ๐ Multi-framework โ ESX, QBCore and QBox through
rps_lib - ๐ Open source โ no escrow, every file is readable and editable
๐ฆ Bank tax
- Taxes a percentage of each player's bank balance every cycle (e.g. 1%)
- Minimum balance โ players below it aren't taxed
- Max tax per collection โ cap what the richest players pay (or
0for no limit) - Job exemptions โ e.g.
police,ambulance,governmentpay no bank tax
๐ Vehicle tax
- Flat amount per vehicle a player owns
- Minimum vehicle count before tax applies, and a max tax cap
- Vehicle table detected automatically โ
owned_vehicleson ESX,player_vehicleson QBCore / QBox โ or set your own table and column - Vehicle counts for all players are loaded in one database query per cycle, not one per player
- Separate job exemptions from the bank tax
๐ณ Collection
- Runs automatically on a configurable interval โ write it in minutes (
240) or with units ('30m','4h','1d','1h30m') - Optional collection on resource start, after a configurable delay
- Allow debt (balance can go negative) or skip players who can't pay and tell them what they owe
- Players are processed one after another, with a short pause in between, so big servers don't hitch
๐ผ Multi-account revenue split
Send each cycle's revenue to as many society accounts as you want:
accounts = {
{ account = 'government', share = 0.70 },
{ account = 'police', share = 0.20 },
{ account = 'ambulance', share = 0.10 },
{ account = 'mechanic', share = 1.0, from = 'vehicle', reason = 'Road Tax' },
}
- Split by percentage across any number of accounts
- Split bank tax and vehicle tax separately โ e.g. all road tax to the mechanics, bank tax shared between government and police
- Custom transaction reason per account
- Works with qb-banking, Renewed-Banking and esx_addonaccount societies (on ESX the
society_prefix is added automatically) - One failed deposit doesn't block the others
- Shares are checked at startup โ the system won't start if your percentages add up to more than 100%
๐ฑ Phone & notifications
- In-game notification with the full breakdown (bank / vehicles / total) โ codem, ox_lib or your framework's own notify
- Tax notice mail to the player's phone, with a detailed breakdown
- Payment failed mail when a player can't cover their taxes
- Banking-app transaction so players see the tax in their phone's bank / wallet app
- lb-phone falls back to an SMS if the player has no mail account set up
- All texts, mail subjects, sender name and currency symbol are editable in the config
๐ Discord logs
- Logs taxes collected, failed and exempt per player, plus a summary per cycle, system start, errors and manual triggers
- The cycle summary shows paid / failed / exempt counts, bank and vehicle tax, the total, every account deposit (โ / โ) and a live countdown to the next collection
- Failed messages are always reported in the console, and rate-limited ones are retried automatically
- Queued & throttled โ messages are sent one by one with a delay, so a big cycle never blocks the server or hits Discord rate limits
- Per-cycle cap โ after X messages, only the summary is sent
- Separate channel per event if you want one (e.g. summaries to a staff channel, failures to another)
- Webhook URLs are kept server-side in
server/webhooks.lua, so players can't see them - Optional player identifiers (license, Steam, clickable Discord mention)
- Custom bot name, avatar, colours and footer
/testtaxwebhookto check your setup in one command
Highlights
๐ Compatibility
| Supported | |
|---|---|
| Frameworks | ESX, QBCore, QBox (auto-detected by rps_lib) |
| Notifications | codem-supreme-notification, ox_lib, framework default (via rps_lib) |
| Phone | lb-phone, qb-phone (via rps_lib) |
| Banking | qb-banking, Renewed-Banking (via rps_lib), esx_addonaccount |
โ๏ธ Installation
- Put
rps_taxesin your resources folder - Add to
server.cfgafter ox_lib, oxmysql, your framework and rps_lib:ensure rps_lib ensure rps_taxes - Set your tax rates, interval and accounts in
config.lua - (Optional) Paste your Discord webhook URL into
server/webhooks.luaand setConfig.Webhook.enabled = true - (ESX + revenue split) Make sure every account you list exists in your
addon_accounttable (e.g.society_government) - Restart and check the console โ it prints the framework, phone, bank and notification system it found
๐ฎ Commands
/collecttaxes |
Run a tax collection right now (admin) |
/checktax [id] |
Show a player's bank balance, vehicles and what they'd pay, without charging them (admin) |
/nexttax |
Show how long until the next tax collection (admin) |
/testtaxwebhook |
Send a test message to your Discord webhook (admin) |
All commands work from the server console too. Admin = admin / superadmin group on ESX, framework admin permission on QBCore / QBox.
๐งฉ Exports (server)
exports.rps_taxes:CollectTaxes() -- run a cycle, returns a summary incl. deposits
exports.rps_taxes:ProcessPlayerTax(source) -- tax one player now
exports.rps_taxes:CalculatePlayerTax(source) -- { bankTax, vehicleTax, bankBalance, vehicleCount } โ no charge
exports.rps_taxes:GetPlayerVehicleCount(identifier)
exports.rps_taxes:GetNextCollectionTime() -- unix time of the next automatic collection
Use CalculatePlayerTax and GetNextCollectionTime to show players their upcoming tax and when it's due in a city hall menu or phone app.
๐ง Config highlights
- Tax interval, collect on start, start delay, currency symbol, debug mode
- Bank tax %, minimum balance, max tax, exempt jobs
- Vehicle tax per vehicle, minimum vehicles, max tax, vehicle table, exempt jobs
- Allow negative balance (debt) or skip players who can't pay
- Revenue accounts, shares, per-tax split and transaction reasons
- Notification position, duration and types
- Phone mail, banking alert, sender name / number, mail subjects
- Discord events, colours, identifiers, throttle and per-cycle cap
- Every player-facing message and mail text
