
   //BioCom     by    Bionic.    lets    admins    have    4    different
   voiceCom-modes.  Vexd_Utilities required.
   #include <amxmod>
   #include <Vexd_Utilities>
   new voicemode[1];
   new strtemp[64];
   new  strvoiceinfo[4][]  =  {"normal","speak  to  all","listen to all",
   "listen and speak to all" };
   new i;
   public client_infochanged(id)
   {
       setspeakmode(id);
       return PLUGIN_CONTINUE;
   }
   public client_connect(id)
   {
       setspeakmode(id);
       return PLUGIN_CONTINUE;
   }
   public getspeakmode(id)
   {
       get_user_info(id,"biocomode",voicemode,1);
       format(strtemp,      64,     "Voicecom-mode:     %s",strvoiceinfo[
   strtonum(voicemode[0])%4 ] );
       client_print(id,print_center,strtemp);
       client_print(id,print_console,strtemp);
       return PLUGIN_HANDLED;
   }
   public changespeakmode(id)
   {
       if ((get_user_flags(id) & ADMIN_CHAT))
       {
           get_user_info(id,"biocomode",voicemode,1);
           i=strtonum(voicemode[0]);
           numtostr(++i%4,voicemode[0],1);

           set_user_info(id,"biocomode",voicemode[0]);
           setspeakmode(id);

           format(strtemp, 64, "Your voicecom is set to %s",strvoiceinfo[
   strtonum(voicemode[0])%4 ] );
           client_print(id,print_center,strtemp);
           client_print(id,print_console,strtemp);
       } else
       {
           client_print(id,print_console,"Hey,  you are not an admin, are
   you? :)");
       }
       return PLUGIN_HANDLED;
   }
   public setspeakmode(id)
   {
       if ((get_user_flags(id) & ADMIN_CHAT))
       {
           get_user_info(id,"biocomode",voicemode,1);
           if(voicemode[0]!='0' &&
              voicemode[0]!='1' &&
              voicemode[0]!='2' &&
              voicemode[0]!='3'
             )
           {
               voicemode[0]='2';
               set_user_info(id,"biocomode",voicemode[0]);
           }

           if(voicemode[0]=='0') SetSpeak(id, SPEAK_NORMAL);
           if(voicemode[0]=='1') SetSpeak(id, SPEAK_ALL);
           if(voicemode[0]=='2') SetSpeak(id, SPEAK_LISTENALL);
           if(voicemode[0]=='3')       SetSpeak(id,      SPEAK_ALL      |
   SPEAK_LISTENALL);
       }
   }
   public plugin_init()
   {
       register_plugin("BioCom","0.9.6-1.1","Bionic");
       register_clcmd("amx_changespeakmode","changespeakmode",ADMIN_CHAT,
   "Alter your VoiceCom-mode");
       register_clcmd("amx_getspeakmode","getspeakmode",ADMIN_CHAT,  "Get
   your current VoiceCom-mode");
       return PLUGIN_CONTINUE;
   }
