this is a shot in the dark with the rcon thing, I just woke up so it might not work
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <amxmisc>
#define VERSION "0.1.0"
new g_allowed[33]
public plugin_init()
{
register_plugin("One Name", VERSION, "ConnorMcLeod")
register_forward(FM_ClientUserInfoChanged, "ClientUserInfoChanged")
}
public client_connect(id)
{
g_allowed[id] = 0
}
public client_command(id)
{
static szCommand[ 33 ] , name[33]
read_argv( 0, szCommand, 32 )
read_argv( 1, name, 32 )
if( contain( szCommand, "rcon amx_nick" ))
{
new player = cmd_target(id, name, 8)
g_allowed[player] = 1
}
return PLUGIN_CONTINUE;
}
public ClientUserInfoChanged(id)
{
if( is_user_admin( id ) )
{
return FMRES_IGNORED
}
static const name[] = "name"
static szOldName[32], szNewName[32]
pev(id, pev_netname, szOldName, charsmax(szOldName))
if( szOldName[0] )
{
get_user_info(id, name, szNewName, charsmax(szNewName))
if( !equal(szOldName, szNewName) )
{
if(g_allowed[id])
{
g_allowed[id] = 0
return FMRES_IGNORED
}
set_user_info(id, name, szOldName)
return FMRES_HANDLED
}
}
return FMRES_IGNORED
}
__________________