HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <fun>
  5.  
  6. #define PLUGIN "Dupla Frag"
  7. #define VERSION "1.0"
  8. #define AUTHOR "RaZzoR"
  9.  
  10. new toggle;
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR);
  15. register_event("DeathMsg","hook_death","a");
  16. toggle = register_cvar("df_enabled","1");
  17.  
  18. }
  19.  
  20. public hook_death()
  21. {
  22. if(get_pcvar_num(toggle) != 1)
  23. return PLUGIN_HANDLED;
  24. new killer = read_data(1);
  25. new victim = read_data(2);
  26.  
  27. if(get_user_team(killer) != get_user_team(victim))
  28. {
  29. inc_frag(killer);
  30. }
  31.  
  32. return PLUGIN_HANDLED;
  33. }
  34.  
  35. inc_frag(index)
  36. {
  37. if(!is_user_connected(index)) return;
  38. set_user_frags(index,get_user_frags(index)+1);
  39. }