Advertisement
RoksasNunes

Lualua

Apr 20th, 2013
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. function onStepIn(cid, item, pos)
  2.  
  3. local sta_min = 1 -- Stamina each minutes
  4.  
  5.     if not isPlayer(cid) then return true end
  6.     if getPlayerStorageValue(cid, 1451) > -1 then return true end
  7.  
  8.     for i = 1, 15 do
  9.         addEvent(doPlayerAddStamina, 1*60*1000, cid, sta_min, true)
  10.             setPlayerStorageValue(cid, 1451, -1)
  11.                 doPlayerSendTextMessage(cid, 27, "Your stamina train is loading, during 15 minutes!")
  12.             end
  13.                 return true
  14.             end
  15.  
  16. function onStepOut(cid, item, pos)
  17.  
  18.     if isPlayer(cid) then
  19.         setPlayerStorageValue(cid, 1451, 1)
  20.             doPlayerSendTextMessage(cid, 27, "Your stamina train has been stoped!")
  21.         end
  22.             return true
  23.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement