My plugin works fine (thank you fysiks) but I went a little further, now I want to remove something a client says from appearing in chat, I have looked, but have not found a way to do this.. here is the code for what is said..
PHP Code:
public handle_say(id)
{
new said[192]
read_args(said,192)
remove_quotes(said)
if( (containi(said, "models") != -1) && !(containi(said, "!models") != -1) || (containi(said, "model") !=-1) && !(containi(said, "!models") != -1) && !(containi(said, "!model") !=-1) ) {
client_print(id, print_chat, "[AMXX] For a menu to select your model, say !models")
client_print(id,print_chat, "[AMXX] Alternatively if you know the modelname, you can say ^"!model MODELNAME^"")
}
if(containi(said, "!model") != -1 && !containi(said, "!models"))
{
replace(said,192,"!model ","")
if(is_valid_model(said))
{
tfc_setmodel(id, said, "1")
client_print(id,print_chat, "[AMXX] Player model set to ^"%s^"", said)
}
else
{
client_print(id,print_chat, "[AMXX] Invalid model, perhaps you should use the menu?")
}
}
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("amx_model","set_model",0,"<skin name>")
register_concmd("amx_modelmenu", "cmdModelMenu", 0, " - Displays Menu of possible player models.")
register_clcmd("say","handle_say")
register_clcmd("say !models","cmdModelMenu", 0, " - Displays Menu of possible player models.")
register_clcmd("say !random","random_model",0,"Sets a Random model")
}
thought I should show the plugin_init also..
the say command !model WHATIWANT works fine, but I dont want it showing up in chat (for when someone is going through the list.. and trying out models)
someone want to tell me how this can be done, if it can be done at all?
__________________