Merge pull request #1146 from Mustachedom/main

fix for allowing bank accounts to go insanely negative
This commit is contained in:
Kakarot
2024-11-08 11:22:04 -05:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@ QBConfig.StatusInterval = 5000 -- how often to check hu
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.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.PayCheckSociety = false -- If true paycheck will come from the society account that the player is employed at, requires qb-management
+1
View File
@@ -341,6 +341,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
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
if not self.Offline then