Spectate Blocker (except For Admins)
Edge
Join Date: 2003-10-20 Member: 21820Members, Constellation
<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>
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
<!--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-->
Has this version tested to be operational on 3.03 servers?
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-->