|
Author
|
Message
|
|
Member
|

10-24-2007
, 16:17
Re: Hooking Console commands
|
#1
|
Hehehe i've done that b4 posting ... as i recall it didn't work ... allso the engclient_cmd didn't work either ... witch was cainda weard ... but I've made a working version of the script ( at least this works for me )
I guess ill post it here for other ppl (if they use search)
Quote:
#include <amxmodx>
#include <amxmisc>
#include <string>
#define PLUGIN "admin2amx"
#define VERSION "1.0"
#define AUTHOR "RaYden"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_command( id ) {
new cmd[64], args[256], cmd1[325]
read_argv( 0, cmd, 63 );
read_args( args, 255 );
if( equali( cmd, "admin_", 6 ) )
{
format(cmd,63,cmd[6])
format(cmd1,324,"amx_%s %s",cmd,args)
client_cmd(id,cmd1)
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
|
|
|
|
|