Advertisement
Skymagnum

Untitled

May 5th, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. --[[ Cliport Item V.1
  2. Autor: Skymagnum/Skyforever
  3. You can post in other forums if you take credits :)
  4. ]]
  5.  
  6. function onUse(cid, item, fromPosition, itemEx, toPosition)
  7.  
  8.     local canPassAtWalls = false
  9.     local removeAtUse = true
  10.  
  11.     if not isWalkable(toPosition, true, true, true) then
  12.          doPlayerSendCancel(cid, "Sorry, not possible.") return true
  13.     end
  14.  
  15.     if canPassAtWalls == false and not isSightClear(fromPosition, toPosition, true))then
  16.          doPlayerSendCancel(cid, "Sorry, you can't do it.") return true
  17.     end
  18.  
  19.     doTeleportThing(cid, toPosition, false)
  20.     doSendDistanceShoot(fromPosition, toPosition, 30)
  21.  
  22.     if removeAtUse then
  23.          doRemoveItem(item.uid, 1)
  24.     end
  25.  
  26.     return true
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement