Server

Events - Serverside

Add / Remove / Set Money

Parameters iban - string - The identifier of a Player

Returns account - table <iban, money, account> - Saved account

account can be 'main' for mainAccount, '1' for secondAccount or 'society' for societyAccount

TriggerEvent('msk_banking:getSharedAccount', iban, function(account)
    print(account.iban, account.money, account.account)
end)
TriggerEvent('msk_banking:getSharedAccount', iban, function(account)
    account.addMoney(amount)
end)

setSharedAccountMoney

This is an EventHandler when saving an account.

Returns data - table <iban, money, account> - Saved account

data.account can be 'main' for mainAccount, '1' for secondAccount or 'society' for societyAccount

AddEventHandler('msk_banking:setSharedAccountMoney', function(data)
    print(data.iban, data.money, data.account)
end)

Last updated