
   /* AMX Mod script. amx_streak
   *
   *
   * by ditka
   *
   */
   #include <amxmod>
   new kills[32] = {0,...}
   new deaths[32] = {0,...}
   new knife[32] = {0,...}
   new hs[32] = {0,...}
   new nade[32] = {0,...}
   new longestkillstreak[32] = {0,...}
   new longestdeathstreak[32] = {0,...}
   public deathmsg_event() {
      new killer_name[32], victim_name[32]
      get_user_name(read_data(1),killer_name,31)
      get_user_name(read_data(2),victim_name,31)
      new killer = read_data(1)
      new victim = read_data(2)
      new headshot = read_data(3)
      client_print(victim, print_chat, "[AMX] %s, your last streak was %d
   kill(s)  (%d  hs,  %d  nade,  %d  knife)", victim_name, kills[victim],
   hs[victim], nade[victim], knife[victim]);
      if (kills[victim] > 4) {
       set_hudmessage(0,  50,  255, -1.0, 0.65, 2, 0.02, 10.0, 0.01, 0.1,
   4)
           show_hudmessage(0,"%s's^nkilling  spree  was  ended by^n%s^n%d
   kills   (%d   hs,  %d  nade,  %d  knife)",  victim_name,  killer_name,
   kills[victim], hs[victim], nade[victim], knife[victim])
      }
      if ( headshot ) {
       hs[killer] ++
      }
      new arg[4]
      read_data( 4 , arg , 3  )
      if ( equal( arg, "kni" ) )  {
           knife[killer] ++
      }
      else if ( equal( arg, "gre" ) )  {
           nade[killer] ++
      }
      kills[killer] += 1;
      kills[victim] = 0;
      deaths[killer] = 0;
      deaths[victim] += 1;
      hs[victim] = 0;
      knife[victim] = 0;
      nade[victim] = 0;
      if (kills[killer] > longestkillstreak[killer]) {
          longestkillstreak[killer] = kills[killer];
      }
      if (deaths[victim] > longestdeathstreak[victim]) {
          longestdeathstreak[victim] = deaths[victim] ;
      }
      return PLUGIN_CONTINUE
   }
   public reset_hud(id) {
       if (kills[id] > 0) {
           set_hudmessage(255,255,255,0.02,0.87,2,  0.05, 0.1, 0.01, 3.0,
   1)
                 show_hudmessage(id,"Your    current    streak    is   %d
   kills.^nYour  longest  killstreak  is %d.  Your longest deathstreak is
   %d.", kills[id], longestkillstreak[id], longestdeathstreak[id])
       } else {
           set_hudmessage(255,255,255,0.02,0.87,2,  0.05, 0.1, 0.01, 3.0,
   1)
                 show_hudmessage(id,"Your    current    streak    is   %d
   deaths.^nYour  longest  killstreak is %d.  Your longest deathstreak is
   %d.", deaths[id], longestkillstreak[id], longestdeathstreak[id])
       }
   }
   public disp_streak(id)
   {
       if (kills[id] > 0) {
           set_hudmessage(255,255,255,0.02,0.87,2,  0.05, 0.1, 0.01, 3.0,
   1)
                 show_hudmessage(id,"Your    current    streak    is   %d
   kills.^nYour  longest  killstreak  is %d.  Your longest deathstreak is
   %d.", kills[id], longestkillstreak[id], longestdeathstreak[id])
       } else {
           set_hudmessage(255,255,255,0.02,0.87,2,  0.05, 0.1, 0.01, 3.0,
   1)
           show_hudmessage(id,"Your  current  streak  is %d deaths.^nYour
   longest   killstreak   is   %d.  Your  longest  deathstreak  is  %d.",
   deaths[id], longestkillstreak[id], longestdeathstreak[id])
       }

       return PLUGIN_CONTINUE
   }
   public client_putinserver(id)
   {
       kills[id] = 0;
       deaths[id] = 0;
       knife[id] = 0;
       hs[id] = 0;
       nade[id] = 0;
       longestdeathstreak[id] = 0;
       longestkillstreak[id] = 0;
       return PLUGIN_CONTINUE
   }
   public plugin_init() {
       register_plugin("Streak","0.9.0","ditka")
       register_event("DeathMsg","deathmsg_event", "a")
       register_event("ResetHUD", "reset_hud", "b");
       register_clcmd("say   /streak","disp_streak",0,"-   displays  your
   streak info")
       return PLUGIN_CONTINUE
   }
