Store logo
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 0 for no limit)
  • Job exemptions โ€“ e.g. police, ambulance, government pay 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_vehicles on ESX, player_vehicles on 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
  • /testtaxwebhook to 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

๐Ÿ“ฆ Requirements

โš™๏ธ Installation

  1. Put rps_taxes in your resources folder
  2. Add to server.cfg after ox_lib, oxmysql, your framework and rps_lib:
    ensure rps_lib
    ensure rps_taxes
    
  3. Set your tax rates, interval and accounts in config.lua
  4. (Optional) Paste your Discord webhook URL into server/webhooks.lua and set Config.Webhook.enabled = true
  5. (ESX + revenue split) Make sure every account you list exists in your addon_account table (e.g. society_government)
  6. 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