Advertisement
GaMeRFoReVeR

Team kills count

Jan 8th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.88 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define PLUGIN "Team kills count"
  7. #define VERSION "1.0"
  8. #define AUTHOR "GaMeR FoReVeR"
  9.  
  10. new tt_kills, ct_kills, iHud;
  11.  
  12. public plugin_init()
  13. {
  14.     register_plugin(PLUGIN, VERSION, AUTHOR);
  15.    
  16.     set_task(7.0, "ShowCount");
  17.     iHud = CreateHudSyncObj();
  18. }
  19.  
  20. public ShowCount()
  21. {
  22.     tt_kills = 0;
  23.     ct_kills = 0;
  24.     new iPlayers[32], iNum;
  25.     get_players(iPlayers, iNum, "h");
  26.     if(!iNum)
  27.         return;
  28.     for(--iNum; iNum<=0; iNum--)
  29.     {
  30.         switch(cs_get_user_team(iPlayers[iNum]))
  31.         {
  32.             case CS_TEAM_T: tt_kills = tt_kills+get_user_frags(iPlayers[iNum]);
  33.             case CS_TEAM_CT: ct_kills = ct_kills+get_user_frags(iPlayers[iNum]);
  34.         }
  35.     }
  36.    
  37.     set_hudmessage(0, 255, 0, -1.0, 0.05, 0, 6.0, 3.0);
  38.     ShowSyncHudMsg(0, iHud, "Terrorists: %d^nCounter-Terrorists: %d", tt_kills, ct_kills);
  39.    
  40.     set_task(2.0, "ShowCount");
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement