Can this plugin fuck my users.ini or interfer with the is_user_admin native? I know it does (hide) remove the admins flag and set it after back. This is the plugin (
http://forums.alliedmods.net/showthread.php?t=28034 ) :
PHP Code:
#include <amxmodx>
#include <amxmisc>
//USAGE: say /spyadmin, toggles your admin on/off
// by Smokey485
new spy[33]; // is the user a spy
new oldflags[33]; // the users old flags for admin
public plugin_init()
{
register_plugin("SpyAdmin v1", "1.01", "Smokey485")
register_clcmd("say /spy", "spy_toggle", -1)
register_clcmd("amx_spyadmin", "spy_toggle", -1)
}
public spy_toggle(id)
{
//although people who aren't admin can use this, its okay because they will just get the z flag anyway
if(spy[id] == 1)
{
set_user_flags(id,oldflags[id],0)
client_print(id,print_chat,"[SPYADMIN] You are now back to your previous admin state.")
new zflag = read_flags("z")
if(containi(oldflags[id], "a") || containi(oldflags[id], "c") || containi(oldflags[id], "d") || containi(oldflags[id], "j"))
remove_user_flags(id,zflag,0)
spy[id] = 0
return PLUGIN_HANDLED;
}
if(spy[id] == 0)
{
oldflags[id] = get_user_flags(id)
client_print(id,print_chat, "[SPYADMIN] You are now hidden as an admin.")
spy[id] = 1
remove_user_flags(id,oldflags[id],0)
new zflag = read_flags("z")
set_user_flags(id, zflag, 0)
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public client_putinserver(id)
{
spy[id] = 0
oldflags[id] = 0
}