Create bill
Export
exports["billing_ui"]:createBill(senderIdentifier, targetIdentifier, reason, amount, target, targetType)Parameters
Name
Data Type
Description
Example
-- ESX example
RegisterCommand("sendInvoiceToOfflinePlayer", function(playerId, args)
local senderIdentifier = ESX.GetPlayerFromId(playerId).identifier
local targetIdentifier = args[1] -- Example 6833b871ee066492978077ef154480366a2374b
local reason = args[2] -- Example "Speed limit exceeded"
local amount = tonumber(args[3]) -- Example 5000
local target = "society_police"
local targetType = "society"
exports["billing_ui"]:createBill(senderIdentifier, targetIdentifier, reason, amount, target, targetType)
end)
-- QBCore example
RegisterCommand("sendInvoiceToOfflinePlayer", function(playerId, args)
local senderIdentifier = QBCore.Functions.GetPlayer(playerId).PlayerData.citizenid
local targetIdentifier = args[1] -- Example GPI46753
local reason = args[2] -- Example "Speed limit exceeded"
local amount = tonumber(args[3]) -- Example 5000
local target = "society_police"
local targetType = "society"
exports["billing_ui"]:createBill(senderIdentifier, targetIdentifier, reason, amount, target, targetType)
end)Last updated