For your say problem:
Code:
// put this in plugin_init();
register_clcmd("say", "CMDHook_Say"); // capture all say commands :)
// put this some where else in the code...
public CMDHook_Say(id)
{
if (!is_user_alive(id))
return PLUGIN_CONTINUE; // show chat as normal
new args[32];
read_args(args, sizeof(args)-1);
new command[32], weapon[32];
parse(args, command, sizeof(command)-1, weapon, sizeof(weapon)-1);
if (equal(command, "/give"))
{
if (equal(weapon, "m4a1")
// do w/e you need to
return PLUGIN_HANDLED; // Don't show chat
}
return PLUGIN_CONTINUE; // appease the compiler.
}
I kind of made the code generic, could be optimized (implement better methods) a lot more.
Anywho, this will allow you to do "/give m4a1", "/give ak47", etc instead of re-creating basically the same command over and over again.
__________________