• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Pay from your bank account.

OTcreator

Active Member
Joined
Feb 14, 2022
Messages
425
Solutions
1
Reaction score
44
Hi!
I used TFS [1.4.2] and when I not have money on backpack I can pay from bank account.
How I can turn off this?
 
Solution
Change implementation of Player.removeTotalMoney & Player.getTotalMoney
get rid of bank related code


or replace it with removeMoney in NPC code, see:
data/npc/lib/npcsystem/modules.lua
Change implementation of Player.removeTotalMoney & Player.getTotalMoney
get rid of bank related code


or replace it with removeMoney in NPC code, see:
data/npc/lib/npcsystem/modules.lua
 
Solution
The latter is probably better, as he specifically asked for bank only. Obviously choose the former if you want it to apply to absolutely everything...
 
How I can turn off this?

The latter is probably better, as he specifically asked for bank only.
Did 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
 
Did 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
My bad, it was meant to say Npc, not bank. And also my bad, because he doesn't even mention Npc anyway haha
 
Back
Top