Player.removeTotalMoney & Player.getTotalMoneyremoveMoney in NPC code, see:Player.removeTotalMoney & Player.getTotalMoneyremoveMoney in NPC code, see:How I can turn off this?
Did he?The latter is probably better, as he specifically asked for bank only.
function Player.getTotalMoney(self)
return self:getMoney()
end
function Player.removeTotalMoney(self, amount)
local moneyCount = self:getMoney()
if amount > moneyCount then
return false
end
self:removeMoney(amount)
return true
end
My bad, it was meant to say Npc, not bank. And also my bad, because he doesn't even mention Npc anyway hahaDid he?
For inventory only:
LUA:function Player.getTotalMoney(self) return self:getMoney() end function Player.removeTotalMoney(self, amount) local moneyCount = self:getMoney() if amount > moneyCount then return false end self:removeMoney(amount) return true end