ox_core
ox_core copied to clipboard
Event for OxAccount update
A way to listen for OxAccount like for group updates using ox:setGroup
Is this a feature request? If so, please elaborate. There's not not enough detail here to understand the request. Explain the problem you are facing, give context (why you are requesting this feature?), provide some use cases, and, if possible, provide some code examples.
Without further detail, this issue will be closed.
Feature request, add a Net Event for OxAccount balance change, for example the event listener for ox:setGroup on the client: AddEventHandler('ox:setGroup'), function()
Like:
AddEventHandler('ox:Account:update_balance', function(account, amount)
UpdateHUD('bank', amount)
end)
@Kaanhehe The following events are emitted server-side for accounts and can be listened to:
emit('ox:updatedBalance', { accountId, amount, action });
emit('ox:transferredMoney', { fromId, toId, amount });
emit('ox:depositedMoney', { playerId, accountId, amount });
emit('ox:withdrewMoney', { playerId, accountId, amount });
emit('ox:invoicePaid', invoice);