Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. function onSay(cid, words, param)
  2.  
  3. local cfg = {
  4. exhau = 3, -- Time you are exhausted in seconds.
  5. storage = 5858, -- Storage used for "exhaust."
  6. exp = 2.0 -- this means 2x more experence then default
  7. }
  8.  
  9.  
  10. if(getPlayerStorageValue(cid, cfg.storage) > os.time() and getPlayerStorageValue(cid, cfg.storage) < 100+os.time()) then
  11. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You must wait another " .. getPlayerStorageValue(cid, cfg.storage) - os.time() .. ' second' .. ((getPlayerStorageValue(cid, cfg.storage) - os.time()) == 1 and "" or "s") .. " to use new pokemon.")
  12. else
  13. if doSendPokemon(cid, param) then
  14. sendAllPokemonsBarPoke(cid)
  15. setPlayerStorageValue(cid, cfg.storage, os.time() + cfg.exhau)
  16. return true
  17. end
  18. doPlayerSendTextMessage(cid, 27, "Sua Barra Esta Totalmente Atualizada")
  19. sendAllPokemonsBarPoke(cid)
  20. end
  21. return true
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement