Spectate Blocker (except For Admins)

EdgeEdge Join Date: 2003-10-20 Member: 21820Members, Constellation
edited April 2005 in General Server Discussion
<div class="IPBDescription">Anyone seen one for AMXX?</div> This plugin I believe was for adminmod. As adminmod is dying (even I converted to AMXX <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> ) some good plugins are being left behind IMHO.

This one really helped out server admins so we could actually play instead of typing "Please join or leave"


Has anyone spotted this animal anywhere? Even a metamod version that uses the mp_serverops would be great.

Thanks for the eyes!

****EDIT*****

Found!!! Posted on modns.org forums as well and KCE came to the rescue....

<a href='http://www.modns.org/forums/index.php?showtopic=1585' target='_blank'>http://www.modns.org/forums/index.php?showtopic=1585</a>

Comments

  • EdgeEdge Join Date: 2003-10-20 Member: 21820Members, Constellation
    Here is the code for AMXX if anyone is interested. I have compiled it successfully and am testing it now.


    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
    /*

    Plugin: Spectator Block
    Version: 1.0
    Author: original plugin : [AsC]Phil
        KRoTaL : added code to make the plugin work with players who have "_vgui_menus" set to "0"      
                 


    English:
    This plugin prevents players who don't have ADMIN_RESERVATION flag from joining spectator mode.
    This plugin is useful if you don't want players to join spectator mode and block one slot on your server.
    But admins can spectate players they suspect of cheating.
    You can change access level below this explanation. Don't forget to compile the plugin in that case.
    Cvar : amx_spectator 1      -     0 : all the players can become spectators
                         1 : only admins can become spectators        

    Français :
    Ce plugin permet, si la variable "allow_spectators" est à 1, d'empêcher les joueurs qui n'ont pas
    le droit d'admin ADMIN_RESERVATION de devenir spectateurs.
    Ainsi les joueurs ne pourront pas bloquer inutilement de slots sur votre serveur, mais vos admins pourront toujours
    devenir spectateurs et observer des joueurs susceptibles de tricher.
    Vous pouvez changer le niveau d'accès sous cette explication. N'oubliez pas de recompiler le plugin dans ce cas.
    Variable : amx_spectator 1      -     0 : tous les joueurs peuvent devenir spectateurs
                             1 : seuls les admins peuvent devenir spectateurs


    */

    #include <amxmodx>

    #define ADMIN_SPECT_ACCESS ADMIN_RESERVATION



    /*******************************************************************************************************************/

    public plugin_init()
    {
      register_plugin("Spectator Block", "1.0", "[AsC]Phil, KRoTaL")
      register_menucmd(register_menuid("Team_Select",1), (1<<0)|(1<<1)|(1<<4)|(1<<5), "team_select")
      register_clcmd("jointeam 6", "join_team")
      register_cvar("amx_spectator", "1")
     
      return PLUGIN_CONTINUE
    }

    public team_select(id, key)
    {
      if (key==5)
      {
          if(!(get_user_flags(id) & ADMIN_SPECT_ACCESS) &&  (get_cvar_num("amx_spectator") == 1))
          {
              client_print(id, print_chat, "* Don't be a **** pick a team!")
              engclient_cmd(id, "chooseteam")
              return PLUGIN_HANDLED
          }
      }
      return PLUGIN_CONTINUE
    }

    public join_team(id)
    {
      if(!(get_user_flags(id) & ADMIN_SPECT_ACCESS) &&  (get_cvar_num("amx_spectator") == 1))
      {
          client_print(id, print_chat, "* Don't be a **** pick a team")
          engclient_cmd(id, "chooseteam")
          return PLUGIN_HANDLED
      }
      return PLUGIN_CONTINUE
    }
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • EdgeEdge Join Date: 2003-10-20 Member: 21820Members, Constellation
    Doesn't work, sorry. Turns out it was for CS, hoping some1 at modns.org will convert it. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
  • EdgeEdge Join Date: 2003-10-20 Member: 21820Members, Constellation
    edited April 2005
    Found it! I had an OLD cd of plugins I've used long ago. This is the metamod version and includes the source if anyone needs it.
  • DepotDepot The ModFather Join Date: 2002-11-09 Member: 7956Members
    <!--QuoteBegin-Edge+Apr 30 2005, 04:05 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Edge @ Apr 30 2005, 04:05 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Found it! I had an OLD cd of plugins I've used long ago. This is the metamod version and includes the source if anyone needs it. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Has this version tested to be operational on 3.03 servers?
  • BorisBoris Join Date: 2002-12-30 Member: 11636Members
    I was starting to wonder if anyone else was going to post in this thread...Edge has been talking to himself for 4 posts... <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->
  • EdgeEdge Join Date: 2003-10-20 Member: 21820Members, Constellation
    LOL I really want this plugin even if i have to talk to myself. <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo--> I had peeps specing all day yesterday.

    Depot, It failed on me, but that's why I posted the link with the source. Hopefully one of you code gods would help out. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad-fix.gif' border='0' style='vertical-align:middle' alt='sad-fix.gif' /><!--endemo-->
Sign In or Register to comment.