mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 17:23:31 +00:00
Merge pull request #1146 from Mustachedom/main
fix for allowing bank accounts to go insanely negative
This commit is contained in:
@@ -8,6 +8,7 @@ QBConfig.StatusInterval = 5000 -- how often to check hu
|
|||||||
QBConfig.Money = {}
|
QBConfig.Money = {}
|
||||||
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0 } -- type = startamount - Add or remove money types for your server (for ex. blackmoney = 0), remember once added it will not be removed from the database!
|
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0 } -- type = startamount - Add or remove money types for your server (for ex. blackmoney = 0), remember once added it will not be removed from the database!
|
||||||
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto' } -- Money that is not allowed going in minus
|
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto' } -- Money that is not allowed going in minus
|
||||||
|
QBConfig.Money.MinusLimit = -5000 -- The maximum amount you can be negative
|
||||||
QBConfig.Money.PayCheckTimeOut = 10 -- The time in minutes that it will give the paycheck
|
QBConfig.Money.PayCheckTimeOut = 10 -- The time in minutes that it will give the paycheck
|
||||||
QBConfig.Money.PayCheckSociety = false -- If true paycheck will come from the society account that the player is employed at, requires qb-management
|
QBConfig.Money.PayCheckSociety = false -- If true paycheck will come from the society account that the player is employed at, requires qb-management
|
||||||
|
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if self.PlayerData.money[moneytype] - amount < QBCore.Config.Money.MinusLimit then return false end
|
||||||
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
|
self.PlayerData.money[moneytype] = self.PlayerData.money[moneytype] - amount
|
||||||
|
|
||||||
if not self.Offline then
|
if not self.Offline then
|
||||||
|
|||||||
Reference in New Issue
Block a user