im testing some new things on my LAN server... and
remove_user_flags( index ) is not working..
its set to remove all flags on client_connect( id ).
but once i connect and spawn i still have all my flags still...
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Activate Admin"
#define VERSION "1.0"
#define AUTHOR "Blizzard"
new szFlags[ 33 ];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd( "test", "test", 0, ": test <password>" );
}
public client_connect( id )
{
szFlags[ id ] = get_user_flags( id );
remove_user_flags( id );
}
public test( id )
{
new iArg[ 32 ];
read_argv( 1, iArg, charsmax( iArg ) );
if( equal( iArg, "password" ) )
{
set_user_flags( id, read_flags( szFlags[ id ] ) );
return PLUGIN_HANDLED;
}
else if( !equal( iArg, "password" ) )
{
console_print( id, "Usage: test <password>" );
}
return PLUGIN_HANDLED;
}
__________________