
   /* AMX Mod script.
   *
   * (c) Copyright 2002-2003, OLO
   * This file is provided as is (no warranties).
   *
   */
   #include <amxmod>
   #define MESSAGES 4
   new messages[MESSAGES][] = {
       "Now all depend on you!",
       "I hope you still have a healthpack.",
       "All your teammates were killed. Good luck!",
       "Now you are alone. Have fun!"
       }
   new announce
   public death_msg(id){
       new cts[32], ts[32], ctsnum, tsnum
       get_players(cts,ctsnum,"ae","CT")
       get_players(ts,tsnum,"ae","TERRORIST")
       if ( ctsnum == 1 && tsnum == 1 ){
           new ctname[32], tname[32]
           get_user_name(cts[0],ctname,31)
           get_user_name(ts[0],tname,31)
           set_hudmessage(200,  100,  0,  -1.0,  0.30,  0, 6.0, 6.0, 0.5,
   0.15, 1)
           show_hudmessage(0,"%s vs. %s",ctname,tname)
           client_cmd(0,"spk misc/maytheforce")
           return PLUGIN_CONTINUE
       }

       if (announce)
           return PLUGIN_CONTINUE

       if ( ctsnum == 1 && tsnum > 1 )
           announce = cts[0]
       else if ( tsnum == 1 && ctsnum > 1 )
           announce = ts[0]

       if (announce){
           new name[32]
           get_user_name(announce,name,31)
           set_hudmessage(200,  100,  0,  -1.0,  0.30,  0, 6.0, 6.0, 0.5,
   0.15, 1)
           show_hudmessage(0,"%s:           %s",name,           messages[
   random_num(0,MESSAGES-1) ] )
           client_cmd(announce,"spk misc/oneandonly")
       }

       return PLUGIN_CONTINUE
   }
   public roundend_msg(id)
       announce = 0
   public plugin_init(){
       register_plugin("Last Man","0.9","default")
       register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2
   =%!MRAD_ctwin","2=%!MRAD_rounddraw")
       register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w
   ")
       register_event("DeathMsg","death_msg","a")
       return PLUGIN_CONTINUE
   }
