Advertisement
Guest User

DMV2

a guest
Dec 23rd, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.31 KB | None | 0 0
  1. //======================================================
  2. // DEATHMATCH GAME V2.0 BY AWANKZ[SDZ]
  3. //======================================================
  4.  
  5. #include <a_samp>
  6. #include <zcmd>
  7.  
  8. #define COLOR_RED 0xAA3333AA
  9. #define COLOR_BLUE 0x33CCFFAA
  10. #define COLOR_ERROR 0xFF6A6AFF
  11. #define COLOR_BOMB 0x96BD6AFF
  12. #define CRYORANGE 0xFF8F59C8
  13.  
  14. new IsPlayerInDM[MAX_PLAYERS];
  15.  
  16. public OnFilterScriptInit()
  17. {
  18. print("\n--------------------------------------");
  19. print(" Deathmatch Game V2.0 By Awankz[SDZ]");
  20. print("--------------------------------------\n");
  21. return 1;
  22. }
  23.  
  24. public OnFilterScriptExit()
  25. {
  26. return 1;
  27. }
  28.  
  29.  
  30. main()
  31. {
  32. print("\n----------------------------------");
  33. print(" Deathmatch Game V2.0 By Awankz[SDZ]");
  34. print("----------------------------------\n");
  35. }
  36.  
  37. public OnGameModeInit()
  38. {
  39. //==========================[DEATHMATCH MAP]==========================================
  40. CreateObject(987, -5.632610, 1580.687988, 11.756023, 0.0000, 0.0000, 168.7500);
  41. CreateObject(987, -40.638699, 1548.209473, 11.750000, 0.0000, 0.0000, 222.4217);
  42. CreateObject(987, -33.967506, 1558.158447, 11.750000, 0.0000, 0.0000, 236.2501);
  43. CreateObject(987, -27.319872, 1568.104736, 11.750000, 0.0000, 0.0000, 236.2501);
  44. CreateObject(987, -20.672970, 1578.042603, 11.750000, 0.0000, 0.0000, 236.2501);
  45. CreateObject(987, -17.343763, 1583.044434, 11.750000, 0.0000, 0.0000, 236.2500);
  46. CreateObject(987, 6.101673, 1578.341675, 11.756023, 0.0000, 0.0000, 168.7500);
  47. CreateObject(987, 17.840260, 1575.998169, 11.756023, 0.0000, 0.0000, 168.7500);
  48. CreateObject(987, 29.546432, 1573.721313, 11.756023, 0.0000, 0.0000, 168.7500);
  49. CreateObject(987, 41.517223, 1573.724487, 11.750000, 0.0000, 0.0000, 180.0000);
  50. CreateObject(987, 47.460960, 1573.751465, 11.750000, 0.0000, 0.0000, 180.0000);
  51. CreateObject(987, 55.903973, 1565.259644, 11.750000, 0.0000, 0.0000, 135.0000);
  52. CreateObject(987, 62.654343, 1555.312012, 11.750000, 0.0000, 0.0000, 124.6095);
  53. CreateObject(987, 67.224915, 1544.283081, 11.750000, 0.0000, 0.0000, 112.5000);
  54. CreateObject(987, 68.274925, 1532.319092, 11.750000, 0.0000, 0.0000, 95.2341);
  55. CreateObject(987, 68.295013, 1520.379761, 11.750000, 0.0000, 0.0000, 90.0000);
  56. CreateObject(987, 68.298714, 1508.448608, 11.756022, 0.0000, 0.0000, 90.0000);
  57. CreateObject(987, 63.719688, 1497.425171, 11.750000, 0.0000, 0.0000, 67.5000);
  58. CreateObject(987, 55.274658, 1488.991699, 11.750000, 0.0000, 0.0000, 45.0000);
  59. CreateObject(987, 45.343430, 1482.340576, 11.750000, 0.0000, 0.0000, 33.7500);
  60. CreateObject(987, 34.249229, 1477.847412, 11.750000, 0.0000, 0.0000, 22.5000);
  61. CreateObject(987, 22.469278, 1475.556152, 11.750000, 0.0000, 0.0000, 11.2500);
  62. CreateObject(987, 10.769938, 1473.198242, 11.750000, 0.0000, 0.0000, 11.2500);
  63. CreateObject(987, -1.163247, 1473.936035, 11.756023, 0.0000, 0.0000, 356.5623);
  64. CreateObject(987, -13.138609, 1473.932129, 11.756022, 0.0000, 0.0000, 0.0000);
  65. CreateObject(987, -25.061956, 1475.213257, 11.756022, 0.0000, 0.0000, 353.9839);
  66. CreateObject(987, -36.087261, 1479.759033, 11.750000, 0.0000, 0.0000, 337.5000);
  67. CreateObject(987, -45.957325, 1486.597534, 11.750000, 0.0000, 0.0000, 325.3906);
  68. CreateObject(987, -54.389473, 1495.036377, 11.750000, 0.0000, 0.0000, 315.0000);
  69. CreateObject(987, -62.829426, 1503.562622, 11.750000, 0.0000, 0.0000, 315.0000);
  70. CreateObject(987, -69.495338, 1513.457642, 11.750000, 0.0000, 0.0000, 303.7500);
  71. CreateObject(987, -71.271576, 1525.313965, 11.759875, 0.0000, 0.0000, 278.6717);
  72. CreateObject(987, -61.503384, 1532.050049, 11.750000, 0.0000, 0.0000, 214.6094);
  73. CreateObject(987, -49.475258, 1540.196289, 11.750000, 0.0000, 0.0000, 213.6728);
  74. CreateObject(987, -51.582584, 1538.679443, 11.750000, 0.0000, 0.0000, 213.7500);
  75. CreateObject(3279, -11.713968, 1574.045288, 11.825617, 0.0000, 0.0000, 337.5000);
  76. CreateObject(3279, -65.122299, 1524.337769, 11.825617, 0.0000, 0.0000, 33.7500);
  77. CreateObject(3279, 43.704330, 1567.267700, 11.831640, 0.0000, 0.0000, 303.7500);
  78. CreateObject(11443, -52.786987, 1506.315430, 11.921745, 0.0000, 0.0000, 101.2500);
  79. CreateObject(3502, 28.324024, 1568.472290, 13.684663, 0.0000, 0.0000, 90.0001);
  80. CreateObject(3502, 19.579010, 1568.493652, 13.678640, 0.0000, 0.0000, 270.0000);
  81. CreateObject(3574, -26.521976, 1546.947144, 14.441691, 0.0000, 0.0000, 22.5000);
  82. CreateObject(7040, -39.221722, 1537.169556, 15.177780, 0.0000, 0.0000, 315.0000);
  83. CreateObject(688, 30.804390, 1487.432861, 12.067604, 0.0000, 0.0000, 0.0000);
  84. CreateObject(688, 45.680870, 1494.034424, 12.067604, 0.0000, 0.0000, 0.0000);
  85. CreateObject(17071, 12.406166, 1481.931274, 14.459307, 0.0000, 0.0000, 135.0000);
  86. CreateObject(12929, -17.837463, 1483.650391, 11.748013, 0.0000, 0.0000, 168.7500);
  87. CreateObject(12929, 58.672089, 1551.133179, 11.748013, 0.0000, 0.0000, 292.5000);
  88. CreateObject(11459, -42.272163, 1497.723267, 11.748177, 0.0000, 0.0000, 348.7500);
  89. CreateObject(11445, 0.366913, 1562.012207, 11.921745, 0.0000, 0.0000, 135.0000);
  90. CreateObject(3502, 10.933332, 1569.357666, 13.528435, 0.0000, 0.0000, 258.7500);
  91. CreateObject(1225, -49.945698, 1507.538086, 12.155755, 0.0000, 0.0000, 0.0000);
  92. CreateObject(1225, -29.431416, 1539.234741, 12.155755, 0.0000, 0.0000, 0.0000);
  93. CreateObject(13591, -34.058716, 1516.021973, 12.093266, 0.0000, 0.0000, 45.0000);
  94. CreateObject(688, 43.908779, 1504.062622, 11.757869, 0.0000, 0.0000, 0.0000);
  95. CreateObject(13630, 20.703262, 1576.871948, 24.741268, 0.0000, 0.0000, 81.4056);
  96. CreateObject(3526, -20.024939, 1488.357178, 11.818418, 0.0000, 0.0000, 258.7500);
  97. CreateObject(3526, -24.459938, 1489.388916, 11.818418, 0.0000, 0.0000, 258.7500);
  98. CreateObject(3526, 55.886711, 1546.668945, 11.818418, 0.0000, 0.0000, 22.5000);
  99. CreateObject(3526, 57.567245, 1542.456909, 11.818418, 0.0000, 0.0000, 22.5000);
  100. CreateObject(3398, -35.358040, 1555.014893, 25.938416, 0.0000, 0.0000, 45.0000);
  101. CreateObject(3398, 67.279877, 1535.816284, 25.938414, 0.0000, 0.0000, 281.2500);
  102. CreateObject(3398, -6.256062, 1474.802856, 25.944437, 0.0000, 0.0000, 180.0000);
  103. CreateObject(3578, -1.481171, 1487.103394, 12.534053, 0.0000, 0.0000, 0.0000);
  104. CreateObject(3866, 11.677105, 1529.616333, 19.588564, 0.0000, 0.0000, 348.7500);
  105. CreateObject(3578, 47.632847, 1560.521484, 12.534057, 0.0000, 0.0000, 326.2500);
  106. CreateObject(2669, -23.334436, 1555.754395, 13.090273, 0.0000, 0.0000, 112.5001);
  107. CreateObject(8613, -6.354053, 1527.787598, 16.121422, 0.0000, 0.0000, 258.7500);
  108. CreateObject(1225, -0.839952, 1522.267334, 20.219534, 0.0000, 0.0000, 0.0000);
  109. CreateObject(1225, 11.106701, 1523.171997, 12.119558, 0.0000, 0.0000, 326.2500);
  110. CreateObject(1225, -1.282711, 1529.744385, 16.330750, 0.0000, 0.0000, 0.0000);
  111. CreateObject(11446, 47.705990, 1516.956299, 11.924904, 0.0000, 0.0000, 0.0000);
  112. CreateObject(11442, 58.822487, 1509.967041, 11.923752, 0.0000, 0.0000, 247.5000);
  113. CreateObject(11457, 57.804840, 1534.242798, 11.357241, 0.0000, 0.0000, 22.5000);
  114. CreateObject(11446, -48.316540, 1518.191895, 11.924904, 0.0000, 0.0000, 191.2500);
  115. CreateObject(944, -18.481148, 1508.437988, 12.634787, 0.0000, 0.0000, 270.0000);
  116. CreateObject(1685, 27.437439, 1555.632202, 12.500000, 0.0000, 0.0000, 0.0000);
  117. CreateObject(1685, 29.052761, 1553.859009, 12.500001, 0.0000, 0.0000, 0.0000);
  118. CreateObject(2633, 1.310471, 1539.991089, 14.324649, 0.0000, 0.0000, 78.7500);
  119. CreateObject(2633, 0.476570, 1535.861084, 14.324649, 0.0000, 0.0000, 258.7500);
  120. CreateObject(2633, -0.340814, 1531.710083, 14.324649, 0.0000, 0.0000, 258.7500);
  121. CreateObject(8615, 3.068629, 1538.022461, 14.199692, 0.0000, 0.0000, 78.7500);
  122. CreateObject(944, 26.257641, 1523.681396, 12.590451, 0.0000, 0.0000, 270.0000);
  123. //===========================================================================================
  124. return 1;
  125. }
  126.  
  127. CMD:deathmatch(playerid, params[])
  128. {
  129. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Deathmatch Game","1.Terrorist\n2.Counter-Terrorist\n3.Exit Deathmatch", "Apply", "Close");
  130. return 1;
  131. }
  132.  
  133. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  134. {
  135. if(dialogid == 1)
  136. {
  137. if(response)
  138. {
  139.  
  140. if(listitem == 0)
  141. {
  142. IsPlayerInDM[playerid] = 1;
  143. if(IsPlayerInDM[playerid] == 1) return SendClientMessage(playerid, 0xFF0000FF,"/exit before you use this command");
  144. new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
  145. GetPlayerName(playerid, name, sizeof(name));
  146. format(string, sizeof(string), ".: %s Join Terrorist Team :.", name);
  147. SendClientMessageToAll(CRYORANGE, string);
  148. SendClientMessage(playerid, 0xFF8F59C8, ".: Use /dmhelp :.");
  149. SetPlayerPos(playerid, 60.1784,1553.6521,12.7500);
  150. GivePlayerMoney(playerid, -15000);
  151. PlayerPlaySound(playerid ,3200,0,0,0);
  152. SetPlayerHealth(playerid, 100);
  153. SetPlayerArmour(playerid, 100);
  154. if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid,CRYORANGE,".: You do not have enough money ! :.");
  155. GivePlayerWeapon(playerid, 24, 18000);
  156. GivePlayerWeapon(playerid, 25, 18000);
  157. GivePlayerWeapon(playerid, 16, 18000);
  158. GivePlayerWeapon(playerid, 28, 18000);
  159. GivePlayerWeapon(playerid, 31, 18000);
  160. return 1;
  161. }
  162. if(listitem == 1)
  163. {
  164. IsPlayerInDM[playerid] = 1;
  165. if(IsPlayerInDM[playerid] == 1) return SendClientMessage(playerid, 0xFF0000FF,"/exit before you use this command");
  166. new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
  167. GetPlayerName(playerid, name, sizeof(name));
  168. format(string, sizeof(string), ":: %s Join Counter-Terrorist Team ::", name);
  169. SendClientMessageToAll(COLOR_BLUE, string);
  170. SendClientMessage(playerid, 0xFF8F59C8, ".: Use /dmhelp :.:");
  171. SetPlayerPos(playerid, -20.3245,1484.4280,12.7500);
  172. GivePlayerMoney(playerid, -15000);
  173. PlayerPlaySound(playerid ,3200,0,0,0);
  174. SetPlayerHealth(playerid, 100);
  175. SetPlayerArmour(playerid, 100);
  176. if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid,CRYORANGE,".: You do not have enough money ! :.");
  177. GivePlayerWeapon(playerid, 24, 18000);
  178. GivePlayerWeapon(playerid, 25, 18000);
  179. GivePlayerWeapon(playerid, 16, 18000);
  180. GivePlayerWeapon(playerid, 28, 18000);
  181. GivePlayerWeapon(playerid, 31, 18000);
  182. return 1;
  183. }
  184. if(listitem == 2)
  185. {
  186. IsPlayerInDM[playerid] = 0;
  187. SpawnPlayer(playerid);
  188. ResetPlayerWeapons(playerid);
  189. return 1;
  190. }
  191. }
  192. return 1;
  193. }
  194.  
  195. return 0;
  196. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement