• 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+ bankier script error

Solution
I am sending the file because the code does not fit
go to data/lib/custom/custom.lua
and add this code in first line, then restart the game and try again

Lua:
function Player.setExhaustion(self, value, time)
    self:setStorageValue(value, time + os.time())
end

function Player.getExhaustion(self, value)
    local storage = self:getStorageValue(value)
    if not storage or storage <= os.time() then
        return 0
    end

    return storage - os.time()
end

function Player:hasExhaustion(value)
    return self:getExhaustion(value) >= os.time() and true or false
end
I am sending the file because the code does not fit
go to data/lib/custom/custom.lua
and add this code in first line, then restart the game and try again

Lua:
function Player.setExhaustion(self, value, time)
    self:setStorageValue(value, time + os.time())
end

function Player.getExhaustion(self, value)
    local storage = self:getStorageValue(value)
    if not storage or storage <= os.time() then
        return 0
    end

    return storage - os.time()
end

function Player:hasExhaustion(value)
    return self:getExhaustion(value) >= os.time() and true or false
end
 
Solution
Post automatically merged:

something I was going to change into core/player.lua ?
u are doing something wrong, lek me see your data/lib/core/player.lua, how you putet the code?
take this file instead of copying the other one, it's the same file
 

Attachments

Back
Top