phone bank notify only for remove bank balance

Fix of showing phone bank notify when removing cash from characters; Phone bank notify will be shown If moneytype is bank.
This commit is contained in:
bashenga
2021-08-08 20:08:51 +03:00
committed by GitHub
parent 31ce00fe26
commit f79161ee95
+4 -2
View File
@@ -256,7 +256,9 @@ QBCore.Player.CreatePlayer = function(PlayerData)
TriggerEvent("qb-log:server:CreateLog", "playermoney", "RemoveMoney", "red", "**"..GetPlayerName(self.PlayerData.source) .. " (citizenid: "..self.PlayerData.citizenid.." | id: "..self.PlayerData.source..")** $"..amount .. " ("..moneytype..") removed, new "..moneytype.." balance: "..self.PlayerData.money[moneytype])
end
TriggerClientEvent("hud:client:OnMoneyChange", self.PlayerData.source, moneytype, amount, true)
TriggerClientEvent('qb-phone:client:RemoveBankMoney', self.PlayerData.source, amount)
if self.PlayerData.money[moneytype] == "bank" then
TriggerClientEvent('qb-phone:client:RemoveBankMoney', self.PlayerData.source, amount)
end
return true
end
return false
@@ -657,4 +659,4 @@ QBCore.EscapeSqli = function(str)
return str:gsub( "['\"]", replacements ) -- or string.gsub( source, "['\"]", replacements )
end
PaycheckLoop()
PaycheckLoop()