Advertisement
NanoBob

MIssile script V2

May 11th, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.64 KB | None | 0 0
  1. jetdoor=createObject(3095,268.70001220703,1883.4000244141,16)
  2. rocket=createObject(3786,268.60000610352,1883.8000488281,-15,0,90,0)
  3. setObjectScale(rocket,13)
  4. blastdoor1=createObject(2929,215.8994140625,1875.5999755859,13.89999961853)
  5. blastdoor2=createObject(2927,211.9,1875.5999755859,13.89999961853)
  6. labdoor=createObject(2951,268.70001220703,1863.9000244141,7)
  7. blastdoorzone=createColSphere(213.80000305176,1876.1999511719,12.1,10)
  8. labdoorzone=createColSphere(268.39999389648,1863,7.8,4)
  9. spawnx,spawny,spawnz=213.30000305176,1908.1999511719,17.3
  10.  
  11.  
  12.  
  13.  
  14. function openblastdoors()
  15.     moveObject(blastdoor1,5000,219.95,1875.5999755859,13.89999961853)
  16.     moveObject(blastdoor2,5000,207.9,1875.6,13.89999961853)
  17. end
  18.  
  19. function closeblastdoors()
  20.     moveObject(blastdoor1,5000,215.69999694824,1875.5999755859,13.89999961853)
  21.     moveObject(blastdoor2,5000,211.69999694824,1875.5999755859,13.89999961853)
  22. end
  23.  
  24. function openlabdoor()
  25.     moveObject(labdoor,5000,264.6,1863.8994140625,7)
  26. end
  27.  
  28. function closelabdoor()
  29.     moveObject(labdoor,5000,268.69921875,1863.8994140625,7)
  30. end
  31.  
  32. function openjetdoor()
  33.     moveObject(jetdoor,7000,268.7,1893,16)
  34.     setTimer(liftoff,7000,1)
  35. end
  36.  
  37. function liftoff()
  38.     flare=createObject(2780,268.7,1884.2,-31.1)
  39.     moveObject(flare,10000,268.7,1884.2,44)
  40.     moveObject(rocket,10000,268.6,1883.8000488281,60)
  41.     setTimer(spacego,10000,1)
  42. end
  43.  
  44. function spacego()
  45.     moveObject(rocket,20000,268.6,1883.8000488281,400)
  46.     moveObject(flare,20000,268.7,1884.2,383)
  47.     setTimer(bye,20000,1)
  48. end
  49.  
  50. function bye()
  51.     destroyElement(rocket)
  52.     destroyElement(flare)
  53.     setTimer(landboom,1000,1)
  54. end
  55.  
  56. function landboom(source)
  57.     triggerClientEvent("camcam",getRootElement())
  58.     landrocket=createObject(3786,xl,yl,400,0,270,0)
  59.     setObjectScale(landrocket,13)
  60.     landflare=createObject(2780,xl,yl,417,0,270,0)
  61.     moveObject(landrocket,10000,xl,yl,zl+4)
  62.     moveObject(landflare,10000,xl,yl,zl+17)
  63.     setTimer(boom,10000,1)
  64. end
  65.  
  66. function boom()
  67.     destroyElement(landrocket)
  68.     destroyElement(landflare)
  69.     createExplosion(xl,yl,zl,10)
  70.     destroyElement(mark)
  71. end
  72.  
  73. function markit(source)
  74.     xl,yl,zl=getElementPosition(source)
  75.     mark=createObject(2780,xl,yl,zl-1.4,270,0,0)
  76. end
  77.  
  78. function spawn()
  79.     spawnPlayer(source,spawnx,spawny,spawnz)
  80.     fadeCamera(source,true)
  81.     setCameraTarget(source,source)
  82. end
  83.  
  84. addEventHandler("onColShapeHit",blastdoorzone,openblastdoors)
  85. addEventHandler("onColShapeLeave",blastdoorzone,closeblastdoors)
  86. addEventHandler("onColShapeHit",labdoorzone,openlabdoor)
  87. addEventHandler("onColShapeLeave",labdoorzone,closelabdoor)
  88. addEventHandler("onPlayerJoin", getRootElement(),spawn)
  89. addCommandHandler("launch",openjetdoor)
  90. addCommandHandler("mark",markit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement