mirror of
https://github.com/RoccoMyTacco/qb-pefcl.git
synced 2026-04-05 00:53:58 -04:00
fix: setBankBalance export data
This commit is contained in:
@@ -100,13 +100,11 @@ of PEFCL and QBCore installed**
|
|||||||
|
|
||||||
```lua
|
```lua
|
||||||
function self.Functions.SetMoney(moneytype, amount, reason)
|
function self.Functions.SetMoney(moneytype, amount, reason)
|
||||||
reason = reason or 'unknown'
|
|
||||||
moneytype = moneytype:lower()
|
moneytype = moneytype:lower()
|
||||||
amount = tonumber(amount)
|
amount = tonumber(amount)
|
||||||
if amount < 0 then return false end
|
if amount < 0 then return false end
|
||||||
if moneytype == 'bank' then
|
if moneytype == 'bank' then
|
||||||
local data = {}
|
local data = {}
|
||||||
data.message = reason
|
|
||||||
data.amount = amount
|
data.amount = amount
|
||||||
exports.pefcl:setBankBalance(self.PlayerData.source, data)
|
exports.pefcl:setBankBalance(self.PlayerData.source, data)
|
||||||
self.PlayerData.money[moneytype] = exports.pefcl:getDefaultAccountBalance(self.PlayerData.source).data or 0
|
self.PlayerData.money[moneytype] = exports.pefcl:getDefaultAccountBalance(self.PlayerData.source).data or 0
|
||||||
|
|||||||
Reference in New Issue
Block a user