Fixed caution not working if set to 0

This commit is contained in:
Fezz
2021-07-05 08:49:36 +01:00
committed by GitHub
parent d05615d04a
commit 4f7e66561f
+1 -1
View File
@@ -108,7 +108,7 @@ AddEventHandler('esx_jobs:caution', function(cautionType, cautionAmount, spawnPo
local xPlayer = ESX.GetPlayerFromId(source)
if cautionType == 'take' then
if cautionAmount <= Config.MaxCaution and cautionAmount > 0 then
if cautionAmount <= Config.MaxCaution and cautionAmount >= 0 then
TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account)
if xPlayer.getAccount('bank').money >= cautionAmount then
xPlayer.removeAccountMoney('bank', cautionAmount)