
   /* AMX Mod script.
   *
   * (c) Copyright 2003, BouBou (c) DevProd.com
   * This file is provided as is (no warranties).
   *
   * Thanks to EJ for caps events
   */
   #include <amxmod>
   new Vname[32],Kname[32],player_kill[33],knife_US[33],
   knife_GB[33],spade_DE[33],bayonet_GB[33],bayonet_DE[33],
   grenade_US[33],grenade_GB[33],grenade_DE[33],first_kill
   public death_msg(id){
      new killer = read_data(1)
      new victim = read_data(2)
      new weapon_data = read_data(3)
      if    (get_cvar_float("amx_dodEvents")    &&   read_data(1)!=0   &&
   get_user_team(killer)!=get_user_team(victim)) {
         get_user_name(killer,Kname,31)
         get_user_name(victim,Vname,31)
         set_hudmessage(200,  150,  0, 0.80, 0.50, 0, 3.0, 5.0, 0.5, 0.5,
   4)
         if(weapon_data == 19){
            spade_DE[killer]++
            if(spade_DE[killer] == 3){
               show_hudmessage(0,"%s^nkilled      3      enemies     with
   spade^nwithout to be killed",Kname)
               spade_DE[killer] = 0
            }
            spade_DE[victim] = 0
         }
         else if(weapon_data == 1){
            knife_US[killer]++
            if(knife_US[killer] == 3){
               show_hudmessage(0,"%s^nkilled      3      enemies     with
   knife^nwithout to be killed",Kname)
               knife_US[killer] = 0
            }
            knife_US[victim] = 0
         }
         else if(weapon_data == 37){
            knife_GB[killer]++
            if(knife_GB[killer] == 3){
               show_hudmessage(0,"%s^nkilled      3      enemies     with
   knife^nwithout to be killed",Kname)
               knife_GB[killer] = 0
            }
            knife_GB[victim] = 0
         }
         else if(weapon_data == 39){
            bayonet_GB[killer]++
            if(bayonet_GB[killer] == 3){
               show_hudmessage(0,"%s^nkilled      3      enemies     with
   bayonet^nwithout to be killed",Kname)
               bayonet_GB[killer] = 0
            }
            bayonet_GB[victim] = 0
         }
         else if(weapon_data == 34){
            bayonet_DE[killer]++
            if(bayonet_DE[killer] == 3){
               show_hudmessage(0,"%s^nkilled      3      enemies     with
   bayonet^nwithout to be killed",Kname)
               bayonet_DE[killer] = 0
            }
            bayonet_DE[victim] = 0
         }
         else if(weapon_data == 13){
            grenade_US[killer]++
            if(grenade_US[killer] == 4){
               show_hudmessage(0,"%s^nkilled      4      enemies     with
   grenade^nwithout to be killed",Kname)
               grenade_US[killer] = 0
            }
            grenade_US[victim] = 0
         }
         else if(weapon_data == 36){
            grenade_GB[killer]++
            if(grenade_GB[killer] == 4){
               show_hudmessage(0,"%s^nkilled      4      enemies     with
   grenade^nwithout to be killed",Kname)
               grenade_GB[killer] = 0
            }
            grenade_GB[victim] = 0
         }
         else if(weapon_data == 14){
            grenade_DE[killer]++
            if(grenade_DE[killer] == 4){
               show_hudmessage(0,"%s^nkilled      4      enemies     with
   grenade^nwithout to be killed",Kname)
               grenade_DE[killer] = 0
            }
            grenade_DE[victim] = 0
         }
         else{
         }
         player_kill[killer]++
         //Display the first victim in the round
         first_kill += player_kill[killer]
         if(first_kill == 1){
               show_hudmessage(0,"%s^nis the first victim",Vname)
         }
         else{
         }
         if(player_kill[killer] >= 5){
             show_hudmessage(0,"%s^nkilled   5   enemies^nwithout  to  be
   killed",Kname)
             player_kill[killer] = 0
         }
         player_kill[victim] = 0
      }
      return PLUGIN_CONTINUE
   }
   public client_connect(id){
      knife_US[id]=0
      knife_GB[id]=0
      spade_DE[id]=0
      bayonet_GB[id]=0
      bayonet_DE[id]=0
      grenade_US[id]=0
      grenade_GB[id]=0
      grenade_DE[id]=0
      player_kill[id]=0
      return PLUGIN_CONTINUE
   }
   public client_disconnect(id){
      knife_US[id]=0
      knife_GB[id]=0
      spade_DE[id]=0
      bayonet_GB[id]=0
      bayonet_DE[id]=0
      grenade_US[id]=0
      grenade_GB[id]=0
      grenade_DE[id]=0
      player_kill[id]=0
      return PLUGIN_CONTINUE
   }
   public caps_reset(){
      new pnum = get_playersnum();
      for(new i = 1; i <= pnum; ++i){
         knife_US[i]=0
         knife_GB[i]=0
         spade_DE[i]=0
         bayonet_GB[i]=0
         bayonet_DE[i]=0
         grenade_US[i]=0
         grenade_GB[i]=0
         grenade_DE[i]=0
         player_kill[i]=0
      }
      first_kill=0
      return PLUGIN_HANDLED
   }
   public plugin_init() {
      register_plugin("DoD Text Bonus","0.9.3","BouBou")
      register_event("DeathMsg","death_msg","a")
      register_event("SetObj", "caps_reset","a","2=0")
      register_cvar("amx_dodEvents","1")
      return PLUGIN_CONTINUE
   }
