Advertisement
RoksasNunes

I'M ZIKA

Apr 17th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. local configs = {
  2.         lv = 100,
  3.         need_premium = false,
  4.         vocation = 270,
  5. }
  6.  
  7. function onUse(cid, item, item2)
  8.         ex = item2.uid
  9.         pos = {x = ex.x, y = ex.y , z = ex.z}
  10.        
  11.         if configs.need_premium then
  12.                 if not isPremium(cid) then
  13.                        
  14.                         doPlayerSendCancel(cid, "Voce precisa ser premium.")
  15.                         return true
  16.                 end
  17.         end
  18.        
  19.         if getPlayerLevel(cid) < configs.lv then
  20.                 doPlayerSendCancel(cid, "Voce precisa do level "..configs.lv)
  21.                 return true
  22.         end
  23.        
  24.         if getPlayervocation(cid) ~= configs.vocation then
  25.                 doPlayerSendCancel(cid, "Voce precisa ser da vocation 270")
  26.                 return true
  27.         end
  28.        
  29.         doTeleportThing(cid, pos)
  30. return true
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement