I think you made a typo in your original code. You executed admin_%s instead of executing amx_%s - making your code do basically nothing.
Code:
public client_command( id ) {
new cmd[64], args[256];
read_argv( 0, cmd, 63 ); // The command is arg 0
read_args( args, 255 ); // Everything else is contained in "args"
if( equali( cmd, "admin_", 6 ) ) // Test if first 6 chars are equal to it
{
replace( cmd, 6, "admin_", "amx_" ); // Replace in the first 6 chars
engclient_cmd( id, "%s %s", cmd, args ); // engclient instead of client since it is going to the engine anyway
return PLUGIN_HANDLED; // block the original command
}
return PLUGIN_CONTINUE; // otherwise do nothing
}
That should get the job done.
__________________