STG ScriptsDocumentation
Billing System

Configuration

Every option in STG Billing System config.lua, from billing jobs and late fees to the menu command and key.

All settings live in stg-billings/config.lua. The file stays editable in the escrow version. Restart the resource after a change.

Language

STG.Language = "en"

Available: en, de, fr, es, pt, it, nl, pl, sv, fi, ar, he, jp, zh. To change a text, edit the matching file in stg-billings/locales/.

Late fees

STG.Fee = 100
STG.lateFee = true

Prop

Type

Every unpaid invoice has its own 24 hour timer that counts down in 30 minute steps while the server is running. When it reaches zero, STG.Fee is added to the invoice's late fee and the timer starts again. The invoice shows the amount, the late fee and the total, and the player pays the total. The late fee goes to the society account together with the amount.

Command

STG.Command = {
    enabled = true,
    command = "invoice"
}

Prop

Type

Key

STG.Key = {
    enabled = true,
    key = "F7",
    description = "Open Billing Menu"
}

Prop

Type

FiveM saves the key in each player's own settings the first time they join. Changing key later only affects new players. Existing players can change it themselves in ESC > Settings > Key Bindings > FiveM.

Billing jobs

STG.Jobs = {
    police = {
        Label = "LSPD",
    }
}

Each key is a job name exactly as your framework knows it, for example police, ambulance or mechanic.

Prop

Type

  • Every player can open Personal Invoices and pay the bills they received.
  • Only players whose current job is listed here can open Create Invoice and Society Invoices. For everyone else these two buttons are dimmed.
  • Society Invoices lists every invoice sent by anyone in the same job, and any member of the job can cancel an unpaid one.
  • An invoice belongs to the job the sender had when sending it. When it is paid, the money goes to that job's society account.

Sending invoices from other scripts

Another resource can create an invoice by triggering the billing server event from the client of the player who sends it:

TriggerServerEvent('stg-billing:send', targetServerId, reason, amount)
ArgumentTypeMeaning
targetServerIdnumberServer id of the player who receives the invoice
reasonstringTitle shown in the invoice list and on the invoice
amountnumberInvoice amount before late fees

The player who triggers the event is saved as the sender, and their current job decides which society sees the invoice and receives the payment. The event needs a player as source, so it does not work with TriggerEvent from server code.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page