Client-side invoice
The CreateInvoice server-side export allows you to generate invoices programmatically within the Quasar Billing system. This is particularly useful for creating customized billing scenarios for various jobs, businesses, or gameplay mechanics.
How to Use
To create an invoice, trigger the following server event:
Parameters Explained
receiverId
: The player ID receiving the invoice.title
: A short title for the invoice.description
: A detailed description of the invoice.amount
: The invoice amount to be paid.isSociety
: Always set totrue
to ensure compatibility. Usingfalse
may result in unexpected behavior.isAlreadyPaid
: Iftrue
, the invoice is marked as paid and logged as payment history. Iffalse
, the player must pay the invoice.giveItem
: Iftrue
, the player will receive the invoice as an item. Iffalse
, the invoice remains virtual.questToGiveItem
: Iftrue
, the player is prompted to accept the invoice item. Iffalse
, the invoice is automatically given or not, depending ongiveItem
.customSocietyName
(optional): Allows setting a custom name for the company issuing the invoice. Usenil
to default to the standard society name.
Example Usage
Here’s an example of how to use this export to create an invoice via a custom command:
Additional Notes
Last updated