Veteran Member
|
01-20-2005
, 20:17
|
#6
|
comment out the code itself, and let me find it. Gimme a sec.
ok, first off you can do this:
Code:
register_clcmd("amx_kickmenu","cmdKickMenu",ADMIN_KICK,"- displays kick menu")
register_clcmd("amx_banmenu","cmdBanMenu",ADMIN_BAN,"- displays ban menu")
register_clcmd("amx_slapmenu","cmdSlapMenu",ADMIN_SLAY,"- displays slap/slay menu")
// register_clcmd("amx_teammenu","cmdTeamMenu",ADMIN_LEVEL_A,"- displays team menu")
register_clcmd("amx_clcmdmenu","cmdClcmdMenu",ADMIN_LEVEL_A,"- displays client cmds menu")
Comment out the amx_teammenu from being used. This won't stop it from being used in amxmodmenu though, so we must go a step further.
Code:
/* Team menu */
public actionTeamMenu(id,key) {
switch (key) {
case 7:{
g_menuOption[id] = 1 - g_menuOption[id]
displayTeamMenu(id,g_menuPosition[id])
}
case 8: displayTeamMenu(id,++g_menuPosition[id])
case 9: displayTeamMenu(id,--g_menuPosition[id])
default: {
new player = g_menuPlayers[id][g_menuPosition[id] * 7 + key]
new authid[32],authid2[32], name[32], name2[32]
get_user_name(player,name2,31)
get_user_authid(id,authid,31)
get_user_authid(player,authid2,31)
get_user_name(id,name,31)
log_amx("Cmd: ^"%s<%d><%s><>^" transfer ^"%s<%d><%s><>^" (team ^"%s^")",
name,get_user_userid(id),authid, name2,get_user_userid(player),authid2, g_menuOption[id] ? "TERRORIST" : "CT" )
switch (get_cvar_num("amx_show_activity")) {
case 2: client_print(0,print_chat,"%L",id,"ADMIN_TRANSF_2",name,name2,g_menuOption[id] ? "TERRORIST" : "CT" )
case 1: client_print(0,print_chat,"%L",id,"ADMIN_TRANSF_1",name2,g_menuOption[id] ? "TERRORIST" : "CT" )
}
new limitt = get_cvar_num("mp_limitteams")
set_cvar_num("mp_limitteams",0)
user_kill(player,1)
engclient_cmd(player, "chooseteam")
engclient_cmd(player, "menuselect", g_menuOption[id] ? "1" : "2" )
engclient_cmd(player, "menuselect", "5")
client_cmd(player,"slot1")
set_cvar_num("mp_limitteams",limitt)
displayTeamMenu(id,g_menuPosition[id])
}
}
return PLUGIN_HANDLED
}
displayTeamMenu(id,pos) {
if (pos < 0) return
get_players(g_menuPlayers[id],g_menuPlayersNum[id])
new menuBody[512]
new b = 0
new i, iteam
new name[32], team[4]
new start = pos * 7
if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0
new len = format(menuBody,511, g_coloredMenus ?
"\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n",
id,"TEAM_MENU",pos+1,( g_menuPlayersNum[id] / 7 + ((g_menuPlayersNum[id] % 7) ? 1 : 0 )) )
new end = start + 7
new keys = MENU_KEY_0|MENU_KEY_8
if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]
for (new a = start; a < end; ++a) {
i = g_menuPlayers[id][a]
get_user_name(i,name,31)
iteam = get_user_team(i,team,3)
if ( (iteam == (g_menuOption[id] ? 1 : 2)) || access(i,ADMIN_IMMUNITY) ) {
++b
if ( g_coloredMenus )
len += format(menuBody[len],511-len,"\d%d. %s\R%s^n\w",b,name,team)
else
len += format(menuBody[len],511-len,"#. %s %s^n",name,team)
}
else {
keys |= (1<<b)
len += format(menuBody[len],511-len, g_coloredMenus ?
"%d. %s\y\R%s^n\w" : "%d. %s %s^n",++b,name,team)
}
}
len += format(menuBody[len],511-len,"^n8. %L^n",id,"TRANSF_TO",g_menuOption[id] ? "TERRORIST" : "CT" )
if (end != g_menuPlayersNum[id])
{
format(menuBody[len],511-len,"^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else format(menuBody[len],511-len,"^n0. %L", id, pos ? "BACK" : "EXIT")
show_menu(id,keys,menuBody,-1,"Team Menu")
}
public cmdTeamMenu(id,level,cid) {
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
g_menuOption[id] = 0
displayTeamMenu(id,g_menuPosition[id] = 0)
return PLUGIN_HANDLED
}
By the looks of it just REMOVING all of that should do it, so that it cannot be used. There IS another option though.
Or so I thought.
Try that and see, you can change the name or maybe commenting out the line for the menu in menufront.sma may get rid of the team menu as an option, I've not tested it though.
good luck
__________________
|
|