Advertisement
RoksasNunes

Syntax_idle

Apr 20th, 2013
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function onStepIn(cid, item, pos)
  2.  
  3. local times = 12 -- Não mexa, =  equação (TOTAL MINUTES/IDLE MINUTES)
  4.  
  5.     if not isPlayer(cid) then return true end
  6.     if getPlayerStorageValue(cid, 1437) > -1 then return true end
  7.  
  8.     for i = 1, times do
  9.         addEvent(doPlayerResetIdleTime, 10*60*1000, cid, true)
  10.         setPlayerStorageValue(cid, 1437, -1)
  11.     end
  12.         return true
  13.     end
  14.    
  15. function onStepOut(cid, item, pos)
  16.  
  17.     if isPlayer(cid) then
  18.         setPlayerStorageValue(cid, 1437, 1)
  19.     end
  20.         return true
  21.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement