View Single Post
Author Message
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 02-22-2010 , 13:13   custom say text :)
Reply With Quote #1

Alrighty first some code then the question.
PHP Code:
...
new 
cSay;
...

public 
plugin_init() {
...

/* -- Chat handling -- */
    
register_clcmd("say""c_say");
    
register_clcmd("say_team""c_say");
    
    
cSay get_user_msgid("SayText");
}

public 
c_say(id) {
    new 
say_content[150],name[31];
    
    
read_args(say_contentsizeof(say_content));
    
remove_quotes(say_content);
    
get_user_name(idnamesizeof(name) -1);
    
    
format(say_content191"[%s] %s: %s",tag,name,say_content);
    
message_begin(MSG_ONEcSay_id);
    
write_byte(id);
    
write_string(say_content);
    
message_end();

So when i execute this code on "say" "say_team" commands,
it writes:
Code:
[TAG] Lure.d: some text
Lure.d: some text
And i need it to destroy original message, and replace it with my "custom" one.
Help!

Last edited by Lure.d; 02-22-2010 at 13:30.
Lure.d is offline
Send a message via Skype™ to Lure.d