Kaiquegabriel

Untitled

Jul 26th, 2018
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2. local cfg = {}
  3. cfg.refuel = 42 * 60 * 1000
  4. if(getPlayerStamina(cid) >= cfg.refuel) then
  5. doPlayerSendCancel(cid, "Your stamina is already full.")
  6. elseif(not isPremium(cid)) then
  7. doPlayerSendCancel(cid, "You must have a premium account.")
  8. else
  9. doPlayerSetStamina(cid, cfg.refuel)
  10. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
  11. doRemoveItem(item.uid)
  12. end
  13. return true
  14. end
Add Comment
Please, Sign In to add comment