Advertisement
RoksasNunes

alavanca_removewall

May 6th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. function onUse(cid, item, frompos, item2, topos)
  2.  
  3. local cfg = {
  4.     trapId = 8807,
  5.     appearMinutes = 5,
  6.     trapPos = {x = 1014, y = 1030, z = 14, stackpos = 1},
  7. }
  8.  
  9.     if getGlobalStorageValue(13199) > os.time() then
  10.         doPlayerSendTextMessage(cid, 27, "Wait "..cfg.appearMinutes.." minutes to remove the wall again!")
  11.             return true
  12.         end
  13.  
  14.     addEvent(doCreateItem, cfg.appearMinutes*60*1000, cfg.trapId, 1, cfg.trapPos)
  15.         setGlobalStorageValue(13199, os.time() + cfg.appearMinutes*60*1000)
  16.             doRemoveItem(getThingFromPos(cfg.trapPos).uid)
  17.                 return true
  18.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement