
   /* AMX Mod script.
   * Plugin editado
   * Edited plugin */
   #include <amxmod>
   public MultiKill
   public MultiKillSound
   public ItalyBonusKill
   public KnifeKill
   public KnifeKillSound
   public GrenadeKill
   public GrenadeSuicide
   public HeadShotKill
   public HeadShotKillSound
   public KillingStreak
   public KillingStreakSound
   public DoubleKill
   public DoubleKillSound
   new g_streakKills[33][2]
   new g_multiKills[33][2]
   new Float:g_doubleKill
   new g_doubleKillId
   new g_MultiKillMsg[7][] = {
     "MULTI KILL !!! - %s^n- %d frags (%d hs)",
     "ULTRA KILL !!! - %s^n- %d frags (%d hs)",
     "KILLING SPREE !!! - %s^n- %d frags (%d hs)",
     "RAMPAGE !!! - %s^n- %d frags (%d hs)",
     "UNSTOPPABLE !!! - %s^n- %d frags (%d hs)",
     "MONSTER KILL !!! - %s^n- %d frags (%d hs)",
     "GODLIKE !!! - %s^n- %d frags (%d hs)"
   }
   new g_Sounds[7][] = {
     "multikill",
     "ultrakill",
     "killingspree",
     "rampage",
     "unstoppable",
     "monsterkill",
     "godlike"
   }
   new g_KillingMsg[7][] = {
     "%s: MULTI KILL !!!",
     "%s: ULTRA KILL !!!",
     "%s: KILLING SPREE !!!",
     "%s: RAMPAGE !!!",
     "%s: UNSTOPPABLE !!!",
     "%s: MONSTER KILL !!!",
     "%s: GODLIKE !!!"
   }
   new g_KinfeMsg[4][] = {
     "%s esfaqueou %s [FACOSA]",
     "%s esfaqueou %s [FACOSA]",
     "%s esfaqueou %s [FACOSA]",
     "%s esfaqueou %s [FACOSA]"
   }
   new g_HeMessages[4][] = {
     "%s explodiu %s [HE]",
     "%s explodiu %s [HE]",
     "%s explodiu %s [HE]",
     "%s explodiu %s [HE]"
   }
   new g_SHeMessages[4][] = {
     "%s se explodiu! [HE]",
     "%s se explodiu! [HE]",
     "%s se explodiu! [HE]",
     "%s se explodiu! [HE]"
   }
   new g_HeadShots[4][] = {
     "$kn matou $vn^n com um tiro na cabeca! [HS]",
     "$kn matou $vn^n com um tiro na cabeca! [HS]",
     "$kn matou $vn^n com um tiro na cabeca! [HS]",
     "$kn matou $vn^n com um tiro na cabeca! [HS]",
   }
   public plugin_init(){
     register_plugin("Kill Stats","0.8br","GambiT_")
     register_event("DeathMsg","eDeathMsg","a")
     register_event("TextMsg","eRestart","a","2&#Game_C","2&#Game_w")
     register_event("SendAudio",             "eEndRound",            "a",
   "2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw")
     register_event("RoundTime", "eNewRound", "bc")
     register_event("StatusValue","setTeam","be","1=1")
     register_event("StatusValue","showStatus","be","1=2","2!0")
     register_event("StatusValue","hideStatus","be","1=1","2=0")
     new mapname[32]
     get_mapname(mapname,31)
     if ( equali( mapname ,  "cs_italy"  ) ) {
       register_event(   "23"   ,   "chickenKill",   "a"   ,   "1=108"  ,
   /*"12=106",*/ "15=4" )
       register_event(  "23" , "radioKill", "a" , "1=108" , /*"12=294",*/
   "15=2" )
     }
   }
   new g_addStast[] = "amx_statscfg add ^"%s^" %s"
   public plugin_cfg(){
     server_cmd(g_addStast,"MultiKill","MultiKill")
     server_cmd(g_addStast,"MultiKillSound","MultiKillSound")
     server_cmd(g_addStast,"Italy Bonus Kill","ItalyBonusKill")
     server_cmd(g_addStast,"Knife Kill","KnifeKill")
     server_cmd(g_addStast,"Knife Kill Sound","KnifeKillSound")
     server_cmd(g_addStast,"Grenade Kill","GrenadeKill")
     server_cmd(g_addStast,"Grenade Suicide","GrenadeSuicide")
     server_cmd(g_addStast,"HeadShot Kill","HeadShotKill")
     server_cmd(g_addStast,"HeadShot Kill Sound","HeadShotKillSound")
     server_cmd(g_addStast,"Killing Streak","KillingStreak")
     server_cmd(g_addStast,"Killing Streak
   Sound","KillingStreakSound")
     server_cmd(g_addStast,"Double Kill","DoubleKill")
     server_cmd(g_addStast,"Double Kill Sound","DoubleKillSound")
   }
   public client_putinserver(id)
     g_multiKills[id] = g_streakKills[ id ] = { 0 , 0 }
   public eDeathMsg(){
     new killerId = read_data(1)
     new victimId = read_data(2)
     new      bool:enemykill      =      (get_user_team(killerId)      !=
   get_user_team(victimId))
     new headshot = read_data(3)
     if ( (KillingStreak || KillingStreakSound) && enemykill ) {
       g_streakKills[ killerId ][ 0 ]++
       g_streakKills[ killerId ][ 1 ] = 0
       g_streakKills[ victimId ][ 1 ]++
       g_streakKills[ victimId ][ 0 ] = 0
       new a = g_streakKills[ killerId ][ 0 ] - 3
       if ( (a > -1) && !( a % 2 ) ) {
         new name[32]
         get_user_name( killerId , name , 31 )
         if ( (a >>= 1) > 6 ) a = 6
         if ( KillingStreak ){
           set_hudmessage(0,  100,  255,  0.05, 0.55, 2, 0.02, 6.0, 0.01,
   0.1, 3)
           show_hudmessage(0,g_KillingMsg[ a ], name )
         }
         if  (  KillingStreakSound  )  client_cmd(  0  ,  "spk misc/%s" ,
   g_Sounds[ a ] )
       }
     }
     if ( MultiKill || MultiKillSound ) {
       if (killerId && enemykill ) {
         g_multiKills[killerId][0]++
         g_multiKills[killerId][1] += headshot
         new param[2]
         param[0] = killerId
         param[1] = g_multiKills[killerId][0]
         set_task( 4.0 + float( param[1] ) ,"checkKills",0,param,2)
       }
     }
     new arg[4]
     read_data( 4 , arg , 3  )
     if ( equal( arg, "kni" ) && ( KnifeKill || KnifeKillSound )  )  {
       if ( KnifeKill ) {
         new killer[32], victim[32]
         get_user_name(killerId,killer,31)
         get_user_name(victimId,victim,31)
         set_hudmessage(255,  100,  100,  -1.0,  0.25,  1, 6.0, 6.0, 0.5,
   0.15, 1)
         show_hudmessage(0,g_KinfeMsg[ random_num(0,3) ],killer,victim)
       }
       if ( KnifeKillSound ) client_cmd(0,"spk misc/humiliation")
     }
     else    if    (   equal(   arg,   "gre"   )   &&   (GrenadeKill   ||
   GrenadeSuicide)  )  {
       new killer[32], victim[32]
       get_user_name(killerId,killer,32)
       get_user_name(victimId,victim,32)
       set_hudmessage(255,  100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15,
   1)
       if ( killerId != victimId ){
         if     (     GrenadeKill    )    show_hudmessage(0,g_HeMessages[
   random_num(0,3)],killer,victim)
       }
       else   if   (  GrenadeSuicide  )  show_hudmessage(0,g_SHeMessages[
   random_num(0,3) ],victim)
     }
     if ( headshot && (HeadShotKill || HeadShotKillSound) )  {
       if ( HeadShotKill ){
         new killer[32], victim[32], weapon[32], message[128]
         get_user_name(killerId,killer,31)
         get_user_name(victimId,victim,31)
         read_data( 4 , weapon , 31  )
         copy( message, 127, g_HeadShots[ random_num(0,6) ] )
         replace( message, 127 , "$vn", victim )
         replace( message, 127 , "$wn", weapon )
         replace( message, 127 , "$kn", killer )
         set_hudmessage(100,  100,  255,  -1.0,  0.29,  0, 6.0, 6.0, 0.5,
   0.15, 1)
         show_hudmessage(0,message )
       }
       if ( HeadShotKillSound ) client_cmd(0,"spk misc/headshot")
     }
     if ( DoubleKill || DoubleKillSound ) {
       new Float:nowtime = get_gametime()
       if ( g_doubleKill == nowtime && g_doubleKillId == killerId ) {
         if ( DoubleKill ) {
           new name[32]
           get_user_name( killerId , name , 31  )
           set_hudmessage(0,  100,  255,  -1.0,  0.35,  0, 6.0, 6.0, 0.5,
   0.15, 3)
           show_hudmessage(0,"- %s matou 2 com apenas um tiro -" ,name )
         }
         if ( DoubleKillSound ) client_cmd(0,"spk misc/doublekill")
       }
       g_doubleKill = nowtime
       g_doubleKillId = killerId
     }
   }
   public checkKills(param[]){
     new id = param[0]
     new a = param[1]
     if (a == g_multiKills[id][0]){
       a -= 3
       if ( a > -1 ){
         if ( MultiKill ) {
           new name[32]
           get_user_name(id,name,31)
           set_hudmessage(255,  0,  100,  0.05, 0.65, 2, 0.02, 6.0, 0.01,
   0.1, 2)
           if ( a > 6 ) a = 6
           show_hudmessage(0,g_MultiKillMsg[a],name,g_multiKills[id][0],g
   _multiKills[id][1])
         }
         if ( MultiKillSound ) client_cmd(0,"spk misc/%s",g_Sounds[a])
       }
       g_multiKills[id] = { 0,0 }
     }
   }
   public chickenKill()
     if  (  ItalyBonusKill ) announceEvent( 0 , "- Alguem matou a galinha
   -"  )
   public radioKill()
     if  ( ItalyBonusKill ) announceEvent( 0 , "- Alguem destruiu o radio
   -" )
   announceEvent( id , message[] ){
     new name[32]
     get_user_name(id, name , 31)
     set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
     show_hudmessage(0,message,name)
   }
