Raised This Month: $ Target: $400
 0% 

remove a say command from chat


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 07-29-2009 , 18:41   remove a say command from chat
Reply With Quote #1

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(idprint_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") != -&& !containi(said"!models"))
{
    
    
replace(said,192,"!model ","")
    if(
is_valid_model(said))
    {
        
tfc_setmodel(idsaid"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(PLUGINVERSIONAUTHOR)
    
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?
__________________
+|- KARMA Respectively

HLM is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode