unlike previous betas, this one has compassion for the admins, so they can perform their role. since if there is no such filter, you will not even be able to open the menu:
Code:
#include <amxmodx>
#include <hamsandwich>
#if AMXX_VERSION_NUM > 182
#define client_disconnect client_disconnected
#else
#define MAX_PLAYERS 32
#endif
new bool:showscore[MAX_PLAYERS + 1]
const taskid = 666
public plugin_init() {
RegisterHam(Ham_Spawn, "player", "Ham_Spawn_Player_post", 1)
RegisterHam(Ham_Killed, "player", "Ham_Killed_Player_post", 1)
}
public client_disconnect(id)
{
if(showscore[id])
{
showscore[id] = false
remove_task(id + taskid)
}
}
public Ham_Spawn_Player_post(id)
{
if(showscore[id] && is_user_alive(id))
{
showscore[id] = false
remove_task(id + taskid)
client_cmd(id, "-showscores")
}
}
public Ham_Killed_Player_post(id)
{
if(get_user_flags(id) & ADMIN_MENU) //<-omited admin's!
{
return HAM_IGNORED
}
showscore[id] = true
set_task(0.1, "showscores", id + taskid, .flags="b")
return HAM_IGNORED
}
public showscores(id)
{
id -= taskid
client_cmd(id, "+showscores")
}
__________________