adrianoswatt

StoneSkin Amulet Exhaust

May 17th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local cfg = {
  2.     delay = 20, -- Em segundos
  3.     storage = 21097, -- Não Precisa Alterar
  4. }
  5.  
  6. function onDeEquip(cid, item, slot)
  7.     if isPlayer(cid) then
  8.         setPlayerStorageValue(cid, cfg.storage, (os.time() + cfg.delay))
  9.         return true
  10.     end
  11. end
  12.  
  13. function onEquip(cid, item, slot)
  14.     if isPlayer(cid) then
  15.         if getPlayerStorageValue(cid, cfg.storage) == -1 or getPlayerStorageValue(cid, cfg.storage) <= os.time() then
  16.             return true
  17.         else
  18.             wait = (getPlayerStorageValue(cid, cfg.storage)-os.time())
  19.             doSendAnimatedText(getThingPos(cid), "Wait "..wait.." seconds", COLOR_WHITE)
  20.             return false
  21.         end
  22.     end
  23.     return true
  24. end
Advertisement
Add Comment
Please, Sign In to add comment