Advertisement
TOTO1996

Deathmatch by TOTO1996

May 20th, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5.  
  6. //////// COLOR //////
  7.  
  8. #define COLOR_GREEN 0xB1FB44FF
  9.  
  10. #define COLOR_YELLOW 0xFFFF00AA
  11. #define COLOR_WHITE 0xFFFFFFAA
  12. #define COLOR_SYSTEM 0x00F6F6AA
  13.  
  14. #define COLOR_BLUE 0x0066F6AA
  15. #define COLOR_GREY 0x7A7979AA
  16. #define COLOR_ORANGE 0xFF9900AA
  17. #define COLOR_PINK 0xF600F6AA
  18. #define COLOR_PURPLE 0x9F00F6AA
  19.  
  20.  
  21. ///////////////////////////
  22.  
  23. new String2015[256];
  24. new InMM[MAX_PLAYERS];
  25.  
  26.  
  27.  
  28. new Float:MMSpawns[][4] = {
  29. {131.7872, 1062.7228, 29.4692,90.5000},
  30. {131.2800, 1031.1852, 29.4692,2.7241},
  31. {89.4745, 1031.3414, 29.8652,177.5425},
  32. {90.0045, 1063.1929, 30.3272,6.7742},
  33. {90.1623, 1097.7803, 30.3272,95.4250},
  34. {131.8577, 1097.4308, 30.3272,353.9040},
  35. {111.2754, 1077.2242, 14.9312},
  36. {111.1654, 1053.0736, 14.9312}
  37. };
  38.  
  39. #if defined FILTERSCRIPT
  40.  
  41. public OnFilterScriptInit()
  42. {
  43.  
  44. return 1;
  45. }
  46.  
  47. public OnFilterScriptExit()
  48. {
  49. return 1;
  50. }
  51.  
  52. COMMAND:mini(playerid,params[])
  53. {
  54. new PlayerName[MAX_PLAYER_NAME];
  55. GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  56.  
  57. if(InMM[playerid] == 1)return SendClientMessage( playerid, -1,"{FFFF00}ERROR: {FFFF00} You are already in a DM arena! Type /leave to exit!" );
  58. {
  59. InMM[playerid] = 1;
  60.  
  61.  
  62.  
  63.  
  64. format(String2015, sizeof(String2015), "[DM] %s [ID:%d] ha aderito al Minigun DM (/mini).", PlayerName, playerid);
  65. SendClientMessageToAll(COLOR_YELLOW, String2015);
  66.  
  67. new rand = random(sizeof(MMSpawns));
  68. SetPlayerPos(playerid, MMSpawns[rand][0], MMSpawns[rand][1], MMSpawns[rand][2]);
  69. SetPlayerFacingAngle(playerid, MMSpawns[rand][3]);
  70.  
  71. ResetPlayerWeapons(playerid); //// RESET ARMI
  72. InMM[playerid] = 1;
  73. GivePlayerWeapon(playerid, 38, 500); // Minigun
  74.  
  75.  
  76. }
  77.  
  78. return 1;
  79. }
  80.  
  81. COMMAND:leave(playerid,params[])
  82. {
  83. InMM[playerid] = 0;
  84.  
  85. SpawnPlayer(playerid);
  86. SetPlayerHealth(playerid, 100);
  87. ResetPlayerWeapons(playerid);
  88. SetPlayerVirtualWorld(playerid, 0);
  89. SetPlayerInterior(playerid, 0);
  90.  
  91. return 1;
  92. }
  93.  
  94. public OnPlayerSpawn(playerid)
  95. {
  96. ////////////// MINI DM ////////
  97.  
  98. if(InMM[playerid] == 1)
  99. {
  100.  
  101.  
  102. new rand = random(sizeof(MMSpawns));
  103. SetPlayerPos(playerid, MMSpawns[rand][0], MMSpawns[rand][1], MMSpawns[rand][2]);
  104. SetPlayerFacingAngle(playerid, MMSpawns[rand][3]);
  105.  
  106. ResetPlayerWeapons(playerid); //// RESET ARMI
  107. GivePlayerWeapon(playerid, 38, 500);
  108.  
  109. }
  110.  
  111.  
  112. return 1;
  113. }
  114. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement