Advertisement
lucas_skk

Script porta

Nov 25th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. --Ola meus amigos tudo bem hoje vou ensinar a faser uma porta com teclado mas e esso o script lua
  2.  
  3. function onUse(cid, item, fromPosition, itemEx, toPosition)
  4.         local toPos = {x = fromPosition.x, y = fromPosition.y -2, z = fromPosition.z}
  5.         if getPlayerItemById(cid, deepSearch, 2159) == 0 then
  6.                 return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
  7.         end
  8.                 if getPlayerItemById(cid, deepSearch, 2159) == 1 then
  9.                         if item.itemid == 2159 then return false end
  10.                 doTeleportThing(cid, toPosition, TRUE)
  11.         else
  12.                 doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You may pass.")
  13.         end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement