I have a problem with the banker. an error pops up after typing the deposit command
I will add that other balance commands are working properly
I will add that other balance commands are working properly
go to data/lib/custom/custom.luaI am sending the file because the code does not fit
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
go to data/lib/custom/custom.luaI am sending the file because the code does not fit
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
core/player.lua
I don't have such a folder. should I create it?
copy the code again, you have not copied the complete code, since the first line
u are doing something wrong, lek me see your data/lib/core/player.lua, how you putet the code?Post automatically merged:
something I was going to change into core/player.lua ?
everything works, thank you for your timeu 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