Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getCD(item, tipo, limite)
-
- if not getItemAttribute(item, tipo) then
- return 0
- end
- local string = getItemAttribute(item, tipo):gsub("cd:", "")
- local number = tonumber(string) - os.time()
- if number <= 0 then
- return 0
- end
- if limite and limite < number then
- return 0
- end
- return number
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement