Commands & Exports
Commands
Server Exports
Export
Example
exports['ks_banking']:requestPayment(
playerId, -- TargetId
amount, -- Amount
societyName, -- ES Society name (ex: "police", "ambulance")
"Service", -- Payment Label (optionnal)
"service_script", -- Sender Script Name (optionnel, debug)
function(success, data)
if success then
-- success = true/false
-- data = invoiceId, amount, receiver, receiverName
-- Success result do what you want here
else
-- Do nothing, or handle error
end
end
)exports['ks_banking']:sendInvoice(
playerId, -- TargetId
fuelAmount, -- Amount
"Plein d'essence", -- Payment Label (REQUIRED)
"fuel_script", -- Sender Script Name (optionnel, debug)
function(success, data)
-- success = true/false
-- data = invoiceId, amount, receiver, receiverName
if success then
-- TriggerClientEvent('fuel:giveFuel', data.receiver, ...)
else
-- Do nothing, or handle error
end
end
)...
local identifier = xPlayer.identifier
exports['ks_banking']:getFirstAccount(identifier, function(account)
if account then
print(("^2[Example] Account found for %s^0"):format(xPlayer.getName()))
print((" - Account ID: %s"):format(account.id))
print((" - Account Name: %s"):format(account.name))
print((" - IBAN: %s"):format(account.iban))
print((" - Balance: $%s"):format(account.balance))
print((" - Cards: %s"):format(#account.cards))
print((" - Transactions: %s"):format(#account.transactions))
else
print(("^1[Example] No account found for %s^0"):format(xPlayer.getName()))
end
end)Mis à jour

