esx_addonaccount

MLO-uri, interioare, hărți optimizate și asset-uri pentru stream.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

esx_addonaccount

Post by greenie »

https://github.com/esx-framework/ESX-Le ... donaccount

Special Accounts System, used by esx_society and esx_billing for storing money.

Usage
There is two types of accounts: shared and not shared.

Shared accounts doesn’t belong to a specific user. Example: society accounts.
None-shared accounts are created for every user in the server. They are created in db when player is loaded, Example: esx_property accounts.
Database Information
An addon account must be configured in the database before using it. you must run a server restart after this.

Table Structure

name
type: string
description: name of the account
label
type: string
description: label of the account (not used)
shared
type: boolean
description: is the account shared with others? (boolean either 0 or 1)
API
getAccount
Event: esx_addonaccount:getAccount

Usage: TriggerEvent('esx_addonaccount:getAccount', name, owner, cb)
Example:
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_realestateagent', function(account)
account.addMoney(500)
end)
Export: exports['esx_addonaccount']:GetAccount

Usage: exports['esx_addonaccount']:GetAccount(name, owner)
Example:
local account = exports['esx_addonaccount']:GetAccount('property_black_money', 'steam:0123456789')
account.addMoney(500))
getSharedAccount
Event: esx_addonaccount:getSharedAccount

Usage: TriggerEvent('esx_addonaccount:getSharedAccount', name, cb)
Example:
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_realestateagent', function(account)
account.addMoney(500)
end)
Export: exports['esx_addonaccount']:GetSharedAccount

Usage: exports['esx_addonaccount']:GetSharedAccount(name)
Example:
local account = exports['esx_addonaccount']:GetSharedAccount('society_realestateagent')
account.addMoney(500)
𝑴𝒂𝒚𝒃𝒆 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 𝒊𝒔 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☢️

✅ GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to “Server Resources”