Skip to content

Commit

Permalink
Merge pull request #1146 from Mustachedom/main
Browse files Browse the repository at this point in the history
fix for allowing bank accounts to go insanely negative
  • Loading branch information
GhzGarage authored Nov 8, 2024
2 parents e488cbe + 304a6f4 commit a1b72ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions server/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1b72ca

Please sign in to comment.