Advertisement
Guest User

UniqueLSPDRampandGate by EzeeCube

a guest
Mar 19th, 2014
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. //this filterscript is made by EzeeCube, I don't care for credits if you need any help add me on skype peroplazar.
  2. //you are free to give me some reputation in samp forum xD
  3. #define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #define MAX_GATES 2
  8.  
  9. new Gate[MAX_GATES],Gate1,Gate2;
  10.  
  11. forward pdcubegate0(playerid);
  12. forward pdcubegate1(playerid);
  13. forward pdcubegate2(playerid);
  14. forward pdcubegate3(playerid);
  15. forward pdcubegate4(playerid);
  16. forward pdcubegate5(playerid);
  17. forward pdcubegate6(playerid);
  18. forward pdcubegate7(playerid);
  19. forward pdcubegate8(playerid);
  20. forward pdcubegate9(playerid);
  21. forward pdcubegate10(playerid);
  22. forward pdcubegate11(playerid);
  23. forward pdcubegate12(playerid);
  24. forward pdcubegate13(playerid);
  25. forward pdcubegate14(playerid);
  26. forward pdcubegate15(playerid);
  27. forward pdcubegate16(playerid);
  28. forward pdcubegate20(playerid);
  29.  
  30. public OnFilterScriptInit()
  31. {
  32. Gate[0] = CreateObject(971,1588.5000000,-1638.3000000,14.1000000,0.0000000,0.0000000,0.0000000);
  33. Gate[1] = CreateObject(968,1544.7000000,-1630.8000000,13.1000000,0.0000000,90,89.4800415);
  34. return 1;
  35. }
  36.  
  37. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
  38. {
  39. if(newkeys & 2 && IsPlayerInAnyVehicle(playerid))
  40. {
  41. if(IsPlayerInRangeOfPoint(playerid,10,1588.5000000,-1638.3000000,14.1000000))
  42. {
  43. switch(Gate1)
  44. {
  45. case true:
  46. {
  47. MoveObject(Gate[0],1598.5000000,-1638.3000000,14.1000000,5);
  48. Gate1 = false;
  49. }
  50. case false:
  51. {
  52. MoveObject(Gate[0],1588.5000000,-1638.3000000,14.1000000,5);
  53. Gate1 = true;
  54. }
  55. }
  56. }
  57. if(IsPlayerInRangeOfPoint(playerid,10,1544.7000000,-1630.8000000,13.1000000))
  58. {
  59. switch(Gate2)
  60. {
  61. case true:
  62. {
  63. SetObjectRot( Gate[1], 0,80,89.4800415);
  64. SetTimer("pdcubegate1", 100, false);
  65. SetTimer("ResetPD1",10000,0);
  66. }
  67. case false:
  68. {
  69. SetObjectRot( Gate[1], 0,10,89.4800415);
  70. SetTimer("pdcubegate8", 100, false);
  71. }
  72. }
  73. }
  74. }
  75. }
  76. public pdcubegate0()
  77. {
  78. SetObjectRot( Gate[1], 0,70,89.4800415);
  79. SetTimer("pdcubegate1", 100, false);
  80. return 1;
  81. }
  82. public pdcubegate1()
  83. {
  84. SetObjectRot( Gate[1], 0,60,89.4800415);
  85. SetTimer("pdcubegate2", 100, false);
  86. return 1;
  87. }
  88. public pdcubegate2()
  89. {
  90. SetObjectRot( Gate[1], 0,50,89.4800415);
  91. SetTimer("pdcubegate3", 100, false);
  92. return 1;
  93. }
  94. public pdcubegate3()
  95. {
  96. SetObjectRot( Gate[1], 0,40,89.4800415);
  97. SetTimer("pdcubegate4", 100, false);
  98. return 1;
  99. }
  100. public pdcubegate4()
  101. {
  102. SetObjectRot( Gate[1], 0,30,89.4800415);
  103. SetTimer("pdcubegate5", 100, false);
  104. return 1;
  105. }
  106. public pdcubegate5()
  107. {
  108. SetObjectRot( Gate[1], 0,20,89.4800415);
  109. SetTimer("pdcubegate6", 100, false);
  110. return 1;
  111. }
  112. public pdcubegate6()
  113. {
  114. SetObjectRot( Gate[1], 0,10,89.4800415);
  115. SetTimer("pdcubegate7", 100, false);
  116. return 1;
  117. }
  118. public pdcubegate7()
  119. {
  120. SetObjectRot( Gate[1], 0,0,89.4800415);
  121. Gate2 = false;
  122. return 1;
  123. }
  124. public pdcubegate8()
  125. {
  126. SetObjectRot( Gate[1], 0,20,89.4800415);
  127. SetTimer("pdcubegate9", 100, false);
  128. return 1;
  129. }
  130. public pdcubegate9()
  131. {
  132. SetObjectRot( Gate[1], 0,30,89.4800415);
  133. SetTimer("pdcubegate10", 100, false);
  134. return 1;
  135. }
  136. public pdcubegate10()
  137. {
  138. SetObjectRot( Gate[1], 0,40,89.4800415);
  139. SetTimer("pdcubegate11", 100, false);
  140. return 1;
  141. }
  142. public pdcubegate11()
  143. {
  144. SetObjectRot( Gate[1], 0,50,89.4800415);
  145. SetTimer("pdcubegate12", 100, false);
  146. return 1;
  147. }
  148. public pdcubegate12()
  149. {
  150. SetObjectRot( Gate[1], 0,60,89.4800415);
  151. SetTimer("pdcubegate13", 100, false);
  152. return 1;
  153. }
  154. public pdcubegate13()
  155. {
  156. SetObjectRot( Gate[1], 0,70,89.4800415);
  157. SetTimer("pdcubegate14", 100, false);
  158. return 1;
  159. }
  160. public pdcubegate14()
  161. {
  162. SetObjectRot( Gate[1], 0,80,89.4800415);
  163. SetTimer("pdcubegate15", 100, false);
  164. return 1;
  165. }
  166. public pdcubegate15()
  167. {
  168. SetObjectRot( Gate[1], 0,90,89.4800415);
  169. Gate2 = true;
  170. return 1;
  171. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement