fix(functions): minor bug

This commit is contained in:
Andyyy7666
2022-09-11 17:42:47 +02:00
committed by GitHub
parent 27929c80f3
commit 24911b7a97

View File

@@ -236,7 +236,7 @@ end
function NDCore.Functions.AddMoney(amount, player, to)
local amount = tonumber(amount)
local player = tonumber(player)
TriggerEvent("ND:moneyChange", player, to, amount, "remove")
TriggerEvent("ND:moneyChange", player, to, amount, "add")
if to == "bank" then
MySQL.query.await("UPDATE characters SET bank = bank + ? WHERE character_id = ? LIMIT 1", {amount, NDCore.Players[player].id})
elseif to == "cash" then