Advertisement
Marlborox

Untitled

Feb 9th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. // Derby Arena
  2. CreateDynamicObject(8558, 1088.24097, 1081.46667, 339.29288, 0.00000, 0.00000, 0.00000, 1337);
  3. CreateDynamicObject(8558, 1127.41797, 1081.43835, 339.25760, 0.00000, 0.00000, 0.00000, 1337);
  4. CreateDynamicObject(8558, 1144.50537, 1101.02014, 339.27115, 0.00000, 0.00000, 91.79996, 1337);
  5. CreateDynamicObject(8558, 1123.87512, 1093.33521, 339.27094, 0.00000, 0.00000, 0.83996, 1337);
  6. CreateDynamicObject(8558, 1122.17712, 1118.27917, 339.24976, 0.00000, 0.00000, 0.83996, 1337);
  7. CreateDynamicObject(8558, 1103.79468, 1100.41699, 339.31155, 0.00000, 0.00000, 91.79996, 1337);
  8. CreateDynamicObject(8558, 1081.72717, 1105.68225, 339.53198, 0.00000, 0.00000, 0.00000, 1337);
  9. CreateDynamicObject(8558, 1081.81274, 1118.00256, 339.31412, 0.00000, 0.00000, 0.00000, 1337);
  10. CreateDynamicObject(8558, 1084.95776, 1134.12683, 339.31409, 0.00000, 0.00000, 0.00000, 1337);
  11. CreateDynamicObject(8558, 1103.33728, 1116.25964, 339.29346, 0.00000, 0.00000, 91.79996, 1337);
  12. CreateDynamicObject(8558, 1125.01794, 1134.18347, 339.36560, 0.00000, 0.00000, 0.00000, 1337);
  13. CreateDynamicObject(8558, 1165.14978, 1134.21069, 339.24799, 0.00000, 0.00000, 0.00000, 1337);
  14. CreateDynamicObject(8558, 1183.56335, 1116.51685, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
  15. CreateDynamicObject(8558, 1162.79163, 1075.30969, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
  16. CreateDynamicObject(8558, 1161.61072, 1111.98914, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
  17. CreateDynamicObject(8558, 1166.61218, 1081.49902, 339.27261, 0.00000, 0.00000, 0.00000, 1337);
  18. CreateDynamicObject(8558, 1183.86804, 1099.70764, 339.25079, 0.00000, 0.00000, 91.79996, 1337);
  19. CreateDynamicObject(8558, 1164.14343, 1037.83032, 339.25070, 0.00000, 0.00000, 91.79996, 1337);
  20. CreateDynamicObject(8558, 1185.21863, 1061.04736, 339.33081, 0.00000, 0.00000, 91.79996, 1337);
  21. CreateDynamicObject(8558, 1069.74573, 1099.44128, 339.32373, 0.00000, 0.00000, 91.79996, 1337);
  22. CreateDynamicObject(8558, 1065.39746, 1118.37439, 339.32373, 0.00000, 0.00000, 91.79996, 1337);
  23. CreateDynamicObject(8558, 1088.04810, 1087.46045, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
  24. CreateDynamicObject(8558, 1165.33704, 1044.06958, 339.31140, 0.00000, 0.00000, 0.00000, 1337);
  25. CreateDynamicObject(8558, 1125.08081, 1043.95593, 339.31140, 0.00000, 0.00000, 0.00000, 1337);
  26. CreateDynamicObject(8558, 1136.15417, 1061.79358, 339.32367, 0.00000, 0.00000, 91.79996, 1337);
  27. CreateDynamicObject(8558, 1105.24731, 1061.67200, 339.38052, 0.00000, 0.00000, 91.79996, 1337);
  28. CreateDynamicObject(8558, 1147.09753, 1019.48438, 339.27191, 0.00000, 0.00000, 0.00000, 1337);
  29. CreateDynamicObject(8558, 1108.25012, 1019.61945, 339.27191, 0.00000, 0.00000, 0.00000, 1337);
  30. CreateDynamicObject(8558, 1089.25854, 1047.51929, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
  31. CreateDynamicObject(8558, 1089.60645, 1037.24792, 339.53201, 0.00000, 0.00000, 91.79996, 1337);
  32.  
  33. //Derby Arena
  34. DerbyEvent[0] = CreateVehicle(502, 1105.6954, 1044.9454, 341.7180+5, 0.0000, -1, -1, 100);
  35. DerbyEvent[1] = CreateVehicle(502, 1090.0642, 1020.8392, 341.7180+5, 0.0000, -1, -1, 100);
  36. DerbyEvent[2] = CreateVehicle(502, 1135.8325, 1081.7300, 341.5983+5, 92.5200, -1, -1, 100);
  37. DerbyEvent[3] = CreateVehicle(502, 1072.9547, 1080.8552, 341.8510+5, 275.4600, -1, -1, 100);
  38. DerbyEvent[4] = CreateVehicle(502, 1087.6243, 1103.4141, 341.8510+5, 176.1600, -1, -1, 100);
  39. for(new i =0; i < 5; i++) SetVehicleVirtualWorld(DerbyEvent[4], 1337);
  40.  
  41.  
  42. //DerbyEvent
  43. new
  44. DerbyEvent[5],
  45. DerbyPlayers,
  46. DerbyStatus,
  47. DerbyTime,
  48. InDerby[MAX_PLAYERS],
  49. DerbyVehicle;
  50.  
  51.  
  52. // Ongamemodeinit
  53. DerbyTime = 30;
  54.  
  55.  
  56. // Commands
  57. CMD:derby(playerid, params[]) {
  58. if(DerbyStatus == 1)
  59. return SCM(playeri, -1, "Derby Inceput!");
  60.  
  61. TogglePlayerControllable(playerid, 0);
  62. SetPlayerVirtualWorld(playerid, 1337);
  63. SetVehicleVirtualWorld(DerbyEvent[DerbyPlayers], 1337);
  64. PutPlayerInVehicle(playerid, DerbyEvent[DerbyPlayers], 0);
  65. DerbyVehicle[playerid] = DerbyEvent[DerbyPlayers];
  66. DerbyPlayers++;
  67. InDerby[playerid] = 1;
  68.  
  69. new string[128];
  70. format(string, sizeof(string), "%s a intrat in arena derby!", GetName(playerid));
  71. SendDerby(COLOR_YELLOW, string);
  72. return 1;
  73. }
  74.  
  75. SendDerby(color, text[]) {
  76. foreach(Playerd, i){
  77. if(InDerby[i] == 1) {
  78. SCM(i, color, text);
  79. }
  80. }
  81. return 1;
  82. }
  83.  
  84. function leave_derby(playerid) {
  85. SetVehicleVirtualWorld(DerbyVehicle[playerid], 1337);
  86. SetVehicleToRespawn(DerbyVehicle[playerid]);
  87. SetPlayerVirtualWorld(playerid, 0);
  88. SpawnPlayer(playerid);
  89. InDerby[playereid] = 0;
  90. DerbyPlayers --;
  91. DerbyVehicle[playerid] = 0;
  92. SCM(playerid, -1, "debug");
  93. return 1;
  94. }
  95.  
  96.  
  97. if(DerbyStatus == 0) {
  98. if(DerbyTime > 0) {
  99. DerbyTime--;
  100. if(DerbyTime == 0){
  101. if(DerbyPlayers < 1) { // < 2
  102. foreach(Player, i) {
  103. if(Derby[i] == 1) leave_derby(i), SCM(i, COLOR_YELLOW "Prea putini playeri!");
  104. }
  105. DerbyStatus = 0;
  106. DerbyTime = 30;
  107. }
  108. else {
  109. DerbyStatus = 1;
  110. DerbyTime = 60;
  111. SendDerby(COLOR_YELLOW, "Runda a inceput !");
  112. foreach(Player, i) {
  113. if(InDerby[i] == 1) TogglePlayerControllable(i, 1);
  114. }
  115. }
  116. }
  117. }
  118. }
  119. if(DerbyStatus == 1) {
  120. if(DerbyTime > 0) {
  121. DerbyTime--;
  122. if(DerbyTime == 0) {
  123. foreach(Player, i) {
  124. if(InDerby[i] ==1) leave_derby(i);
  125. }
  126. DerbyStatus = 0;
  127. DerbyTime = 30;
  128. SendDerby(COLOR_YELLOW, "Nimeni nu a castigat!");
  129. }
  130. else {
  131. if(DerbyPlayers == 0) { // == 1
  132. foreach(Player, i) {
  133. if(Derby[i] == 1) leave_derby(i), SCM(i, COLOR_YELLOW "Felicitari! Ai castigat!");
  134. }
  135. DerbyStatus = 0;
  136. DerbyTime = 30;
  137. }
  138. }
  139. }
  140. }
  141.  
  142.  
  143. if(InDerby[i] == 1) {
  144. if(DerbyStatus == 1) {
  145. new Float: Pos[3];
  146. GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
  147. if(Pos[2] < 329.9276) leave_derby(i);
  148. }
  149. }
  150.  
  151.  
  152. // OnPlayereDisconnect si la OnlayerSpawn
  153. if(InDerby[playerid] == 1) leave_derby(playerid);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement