Advertisement
NanoBob

failed gate script

May 10th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. function gate()
  2.     x1,y1,z1 = getElementPosition (object (wrongs-gate)(1))
  3.     x2,y2,z2 = x1+5,y1+5,z1+5
  4.     x4,y4,z4 = getElementPosition source
  5.     if  (x4<=x2) and (y4<=y2) and (z4<=z2) then
  6.     then
  7.         z3=z1+3
  8.         MoveObject (object (wrongs-gate)(1), x1,y1,z3)
  9.         sleep(5)
  10.         MoveObject (object (wrongs-gate)(1), x1,y1,z1)
  11. end
  12.  
  13. function spawn()
  14.     TeamLess=createTeam(TeamLess,0,300,0)
  15.     spawnPlayer(source,2791,-2456,14)
  16.     fadeCamera(source,true)
  17.     setCameraTarget(source,source)
  18.     outputChatBox("NanoBob's testserver", source)
  19.     outputChatBox("Type /login [PASSWORD] to login or /register[PASSWORD] to register")
  20.     giveWeapon(source,31,4000)
  21.     setPlayerTeam(source,TeamLess)
  22. end
  23. addEventHandler("onPlayerJoin", getRootElement(), spawn)
  24. addEventHandler("OpenGate",gate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement