Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2014
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.46 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new EnCours[MAX_PLAYERS];
  4. new Point[MAX_PLAYERS];
  5. new Cible[4];
  6. new CibleStatus[4];
  7. new ENTER;
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. CreateObject(19377, -3894.46997, 1703.28125, 0.78550, 0.00000, 0.00000, 0.00000);
  12. CreateObject(19377, -3894.42383, 1696.83154, 0.78550, 0.00000, 0.00000, 0.00000);
  13. CreateObject(19377, -3894.42383, 1687.37854, 0.78550, 0.00000, 0.00000, 0.00000);
  14. CreateObject(19377, -3899.09863, 1682.38745, 0.78550, 0.00000, 0.00000, 92.88600);
  15. CreateObject(19377, -3908.47974, 1681.84302, 0.78550, 0.00000, 0.00000, 92.88600);
  16. CreateObject(19377, -3913.45386, 1686.39490, 1.19650, 0.00000, 0.00000, 3.28800);
  17. CreateObject(19377, -3913.95996, 1695.78271, 1.19650, 0.00000, 0.00000, 3.28800);
  18. CreateObject(19377, -3914.31958, 1702.38281, 1.19650, 0.00000, 0.00000, 3.28800);
  19. CreateObject(19377, -3909.87207, 1707.30249, 0.78550, 0.00000, 0.00000, 92.88600);
  20. CreateObject(19377, -3900.39600, 1707.78857, 0.78550, 0.00000, 0.00000, 92.88600);
  21. CreateObject(19377, -3899.16162, 1707.95483, 0.78550, 0.00000, 0.00000, 92.88600);
  22. CreateObject(19375, -3899.40259, 1703.11121, 1.21850, 0.00000, 90.00900, 2.46600);
  23. CreateObject(19375, -3899.02222, 1693.67810, 1.21850, 0.00000, 90.00900, 2.46600);
  24. CreateObject(19375, -3898.70898, 1686.61523, 1.21850, 0.00000, 90.00900, 2.46600);
  25. CreateObject(19375, -3909.32471, 1702.38745, 1.21850, 0.00000, 90.00900, 2.46600);
  26. CreateObject(19375, -3908.70215, 1692.89294, 1.21850, 0.00000, 90.00900, 2.46600);
  27. CreateObject(19375, -3908.86816, 1686.22925, 1.21850, 0.00000, 90.00900, 2.46600);
  28. CreateObject(19375, -3908.87158, 1686.20959, -0.01450, 0.00000, 90.00900, 2.46600);
  29. CreateObject(19377, -3899.38696, 1698.85767, -2.91350, 0.00000, 0.00000, 92.88600);
  30. CreateObject(19377, -3909.02075, 1698.37439, -2.91350, 0.00000, 0.00000, 92.88600);
  31. CreateObject(19375, -3899.34570, 1686.80249, 6.15050, 0.00000, 90.00900, 2.46600);
  32. CreateObject(19375, -3899.11621, 1696.26880, 6.15050, 0.00000, 90.00900, 2.46600);
  33. CreateObject(19375, -3899.55347, 1705.66589, 6.15050, 0.00000, 90.00900, 2.46600);
  34. CreateObject(19375, -3909.63794, 1705.30725, 6.15050, 0.00000, 90.00900, 2.46600);
  35. CreateObject(19375, -3908.43872, 1695.67554, 6.15050, 0.00000, 90.00900, 2.46600);
  36. CreateObject(19375, -3908.52686, 1686.51489, 6.15050, 0.00000, 90.00900, 2.46600);
  37. CreateObject(19377, -3909.02075, 1698.37439, 9.58650, 0.00000, 0.00000, 92.88600);
  38. CreateObject(19377, -3909.02075, 1698.37439, -2.91350, 0.00000, 0.00000, 92.88600);
  39. CreateObject(19377, -3899.52026, 1698.89758, 9.58650, 0.00000, 0.00000, 92.88600);
  40. CreateObject(18260, -3902.97119, 1687.41785, 2.94590, 0.00000, 0.00000, 0.00000);
  41. Cible[0] = CreateObject(1583, -3910.62695, 1692.39905, 1.30020, 0.00000, 0.00000, 0.00000);
  42. Cible[1] = CreateObject(1583, -3905.80786, 1688.31018, 1.30020, 0.00000, 0.00000, 0.00000);
  43. Cible[2] = CreateObject(1583, -3899.79858, 1690.89612, 1.30020, 0.00000, 0.00000, 0.00000);
  44. Cible[3] = CreateObject(1583, -3898.26343, 1685.98938, 1.30020, 0.00000, 0.00000, 0.00000);
  45. CibleStatus[0] = 0;
  46. CibleStatus[1] = 0;
  47. CibleStatus[2] = 0;
  48. CibleStatus[3] = 0;
  49. ENTER = CreatePickup(1274, 2, 1367.9200,-1279.9858,13.5469);
  50. SetTimer("BougerCible", 1000,true);
  51. return 1;
  52. }
  53.  
  54. stock minrand(min, max) //By Alex "Y_Less" Cole
  55. {
  56. return random(max - min) + min;
  57. }
  58.  
  59. public OnPlayerPickUpPickup(playerid, pickupid)
  60. {
  61. if(pickupid == ENTER)
  62. {
  63. SetPlayerInterior(playerid,0);
  64. TogglePlayerClock(playerid,0);
  65. SetPlayerHealth(playerid,9999999);
  66. SetPlayerPos(playerid,-3899.4026, 1703.1112, 1.2185+3);
  67. GivePlayerWeapon(playerid,24,6);
  68. EnCours[playerid] = 1;
  69. }
  70. return 1;
  71. }
  72.  
  73.  
  74. public BougerCible()
  75. {
  76. CibleStatus[0] = minrand(0, 2);
  77. CibleStatus[1] = minrand(0, 2);
  78. CibleStatus[2] = minrand(0, 2);
  79. CibleStatus[3] = minrand(0, 2);
  80. if(CibleStatus[0] == 0)
  81. {
  82. MoveObject(Cible[0], -3899.79858, 1690.89612, 1.30020,4.5);
  83. }
  84. if(CibleStatus[0] == 1)
  85. {
  86. MoveObject(Cible[0], -3910.62695, 1692.89905, 1.30020,4.5);
  87. }
  88. if(CibleStatus[1] == 0)
  89. {
  90. MoveObject(Cible[1], -3905.80786, 1688.81018, 1.30020,4.5);
  91. }
  92. if(CibleStatus[1] == 1)
  93. {
  94. MoveObject(Cible[1], -3902.30786, 1688.81018, 1.30020,4.5);
  95. }
  96.  
  97. if(CibleStatus[2] == 0)
  98. {
  99. MoveObject(Cible[2],-3907.29858, 1690.89612, 1.30020,4.5);
  100. }
  101. if(CibleStatus[2] == 1)
  102. {
  103. MoveObject(Cible[2],-3900.79858, 1690.89612, 1.30020,4.5);
  104. }
  105.  
  106. if(CibleStatus[3] == 0)
  107. {
  108. MoveObject(Cible[3],-3898.26343, 1685.98938, 1.30020,4.5);
  109. }
  110. if(CibleStatus[3] == 1)
  111. {
  112. MoveObject(Cible[3],-3899.76343, 1683.98938, 1.30020,4.5);
  113. }
  114. return 1;
  115. }
  116.  
  117. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  118. {
  119. if(EnCours[playerid] == 1)
  120. {
  121. if(GetPlayerAmmo(playerid) == 1)
  122. {
  123. SendClientMessage(playerid,-1,"{B9121B}Your license is missed");
  124. Point[playerid] = 0;
  125. SetPlayerPos(playerid,1350.1563, -1250.8359, 14.1328);
  126.  
  127. DestroyObject(Cible[0]);
  128. DestroyObject(Cible[1]);
  129. DestroyObject(Cible[2]);
  130. DestroyObject(Cible[3]);
  131. Cible[0] = CreateObject(1583, -3910.62695, 1692.39905, 1.30020, 0.00000, 0.00000, 0.00000);
  132. Cible[1] = CreateObject(1583, -3905.80786, 1688.31018, 1.30020, 0.00000, 0.00000, 0.00000);
  133. Cible[2] = CreateObject(1583, -3899.79858, 1690.89612, 1.30020, 0.00000, 0.00000, 0.00000);
  134. Cible[3] = CreateObject(1583, -3898.26343, 1685.98938, 1.30020, 0.00000, 0.00000, 0.00000);
  135. return 1;
  136. }
  137. if(hittype == 3)
  138. {
  139. if(hitid == Cible[0] || hitid == Cible[1] || hitid == Cible[2] || hitid == Cible[3])
  140. {
  141. Point[playerid]++;
  142. DestroyObject(hitid);
  143. if(Point[playerid] == 4)
  144. {
  145. SendClientMessage(playerid,-1,"{77FE01}Congratulations!! {CCCCCC}You have successfully completed your license");
  146. Point[playerid] = 0;
  147. SetPlayerPos(playerid,1350.1563, -1250.8359, 14.1328);
  148. ResetPlayerWeapons(playerid);
  149.  
  150. DestroyObject(Cible[0]);
  151. DestroyObject(Cible[1]);
  152. DestroyObject(Cible[2]);
  153. DestroyObject(Cible[3]);
  154. Cible[0] = CreateObject(1583, -3910.62695, 1692.39905, 1.30020, 0.00000, 0.00000, 0.00000);
  155. Cible[1] = CreateObject(1583, -3905.80786, 1688.31018, 1.30020, 0.00000, 0.00000, 0.00000);
  156. Cible[2] = CreateObject(1583, -3899.79858, 1690.89612, 1.30020, 0.00000, 0.00000, 0.00000);
  157. Cible[3] = CreateObject(1583, -3898.26343, 1685.98938, 1.30020, 0.00000, 0.00000, 0.00000);
  158. return 1;
  159. }
  160. }
  161. }
  162. }
  163. return 1;
  164. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement