fix: setBankBalance export data

This commit is contained in:
Sam Shanks
2022-08-01 00:05:26 +01:00
committed by GitHub
parent 055e07fef1
commit 243249bf2e

View File

@@ -100,13 +100,11 @@ of PEFCL and QBCore installed**
```lua
function self.Functions.SetMoney(moneytype, amount, reason)
reason = reason or 'unknown'
moneytype = moneytype:lower()
amount = tonumber(amount)
if amount < 0 then return false end
if moneytype == 'bank' then
local data = {}
data.message = reason
data.amount = amount
exports.pefcl:setBankBalance(self.PlayerData.source, data)
self.PlayerData.money[moneytype] = exports.pefcl:getDefaultAccountBalance(self.PlayerData.source).data or 0