Shop Account

Explanation of how the shop accounts work and useful exports/events to be used in other resources.

The resource offers a custom account system that is standalone and not dependent on frameworks.

You can also use esx_addonaccount or qb-banking with config options and all accounts updates will be synced instantly. This will be usefull if you have custom HUDs etc. that are fetching data from those scripts.

Makes sure you have set SocietyAccount = 'default' in t1ger_lib/config.lua:

If you are not using qb-banking for society accounts and still stuck with old qb-management sh*t, then please follow these instruction: QB Management

  1. Navigate to t1ger_tuningsystem/config.lua

  2. Find Config.ShopCreator

  3. Set UseSocietyAccounts = true

To use these exports/events, you must have the shopId and the amount as parameters.

Add Account Money

Adds x money to the given account.

Server

exports['t1ger_tuningsystem']:AddAccountMoney(shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to add to the account

Client

TriggerServerEvent('tuningsystem:server:addAccountMoney', shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to add to the account

Remove Account Money

Removes x money from the given account.

Server

exports['t1ger_tuningsystem']:RemoveAccountMoney(shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to remove from the account

Client

TriggerServerEvent('tuningsystem:server:removeAccountMoney', shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to remove from the account

Set Account Money

Sets the account balance of the given account to x.

Server

exports['t1ger_tuningsystem']:SetAccountMoney(shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to set the new account balance to.

Client

TriggerServerEvent('tuningsystem:server:setAccountMoney', shopId, amount)
-- shopId(INT): tuner shop id
-- amount(INT): amount of money to set the new account balance to.

Last updated