
   /* AMX Mod script.
   *
   * By: Toverand (aka Dan Mascaro)
   * Created: February 2, 2003
   * EMail: Toverand@hotmail.com
   * IRC: #pf^ on GamesNet
   * This file is provided as is (no warranties).
   *
   * Speech port from plugin_speech by Yensid from adminmod and [WHO]Them
   * Portions of code used from OLO's default admin_chat plugin
   */
   #include <amxmod>
   #include <amxmisc>
   public admin_speak(id,level,cid) {
       if (!cmd_access(id,level,cid,3))
           return PLUGIN_HANDLED
       new user[32]
       read_argv(1,user,31)
       new player = cmd_target(id,user,3)
       if (!player) return PLUGIN_HANDLED
       new sound[32]
       read_argv(2,sound,31)
       client_cmd(player,"spk ^"%s^"",sound)
       return PLUGIN_HANDLED
   }
   public admin_speakall(id,level,cid) {
       if (!cmd_access(id,level,cid,2))
           return PLUGIN_HANDLED
       new sound[32]
       read_argv(1,sound,31)
       client_cmd(0,"spk ^"%s^"",sound)
       return PLUGIN_HANDLED
   }
   public admin_speakteam(id,level,cid) {
       if (!cmd_access(id,level,cid,3))
           return PLUGIN_HANDLED
       new sound[32], steam[3]
       read_argv(1,steam,2)
       read_argv(2,sound,31)
       new teamnum = strtonum(steam)
       new plist[32],pnum
       get_players(plist, pnum)
       for(new i=0; i<pnum; ++i)
           if( teamnum == get_user_team(plist[i]) )
               client_cmd(plist[i],"spk ^"%s^"", sound )
       return PLUGIN_HANDLED
   }
   public plugin_init(){
       register_plugin("Speech","1.1","Toverand")
       register_concmd("amx_speak","admin_speak",ADMIN_LEVEL_A,"<authid,
   nick or #userid> <msg> - speak words on system of target.")
       register_concmd("amx_speakall","admin_speakall",ADMIN_LEVEL_A,"<ms
   g> - speak words on system of everyone")
       register_concmd("amx_speakteam","admin_speakteam",ADMIN_LEVEL_A,"<
   team#> <msg> - speak words on systems of everyone on team.")
       return PLUGIN_CONTINUE
   }
