Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exhaustion =
- {
- check = function (cid, storage)
- return getPlayerStorageValue(cid, storage) >= os.time(t)
- end,
- get = function (cid, storage)
- local exhaust = getPlayerStorageValue(cid, storage)
- if(exhaust > 0) then
- local left = exhaust - os.time(t)
- if(left >= 0) then
- return left
- end
- end
- return false
- end,
- set = function (cid, storage, time)
- setPlayerStorageValue(cid, storage, os.time(t) + time)
- end,
- make = function (cid, storage, time)
- local exhaust = exhaustion.get(cid, storage)
- if(not exhaust) then
- exhaustion.set(cid, storage, time)
- return true
- end
- return false
- end
- }
Add Comment
Please, Sign In to add comment