HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define PLUGIN "Frags CT of TE"
  5. #define VERSION "1.0"
  6. #define AUTHOR "pixxa112"
  7.  
  8. new ctfrags = 0
  9. new tfrags = 0
  10.  
  11. public plugin_init() {
  12.  
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14. register_event("DeathMsg", "halal", "a");
  15. register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_")
  16. register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing")
  17.  
  18. set_task(5.0, "hud")
  19. }
  20.  
  21. public round_first()
  22.  
  23. ctfrags = 0, tfrags = 0
  24.  
  25. public halal()
  26. {
  27. static killer
  28. killer = read_data(1);
  29. if(get_user_team(killer) == 2)
  30. ctfrags++
  31. if(get_user_team(killer) == 1)
  32. tfrags++
  33.  
  34. return PLUGIN_CONTINUE
  35.  
  36. }
  37.  
  38. public hud()
  39. {
  40.  
  41. set_hudmessage(random(255),random(255), random(255), 0.0, 0.6, 0, 0.6, 5.0)
  42. show_hudmessage(0,"Frags of CT: %d^nFrags of TE: %d",ctfrags, tfrags)
  43.  
  44. set_task(5.0, "hud")
  45. }