mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
fix(es_extended): return 0 from getMoney when the money account is absent
This commit is contained in:
@@ -114,7 +114,8 @@ function CreateExtendedPlayer(playerId, identifier, ssn, group, accounts, invent
|
||||
end
|
||||
|
||||
function self.getMoney()
|
||||
return self.getAccount("money").money
|
||||
local account = self.getAccount("money")
|
||||
return account and account.money or 0
|
||||
end
|
||||
|
||||
function self.addMoney(money, reason)
|
||||
|
||||
Reference in New Issue
Block a user