ok, I finished writing this and i just noticed that I'm pretty sure that register_event doesn't get called if you block the event.
Code:
public plugin_init()
{
set_msg_block(get_user_msgid("SayText"),BLOCK_SET)
register_event("SayText","event_SayText","a")
}
public event_SayText()
{
if(get_msg_block(get_user_msgid("SayText"))==BLOCK_NOT)
{
set_msg_block(get_user_msgid("SayText"),BLOCK_SET)
}
new said[200]
read_data(4,said,199)
if(containi(said,"changed name to")!=-1)
{
new string1[200], string2[200], string3[200]
read_data(2,string1,199)
read_data(3,string2,199)
read_data(4,string3,199)
set_msg_block(get_user_msgid("SayText"),BLOCK_NOT)
message_begin(MSG_ONE,get_user_msgid("SayText"),{0,0,0},0)
write_byte(read_data(1))
write_string(string1)
write_string(string2)
write_string(string3)
message_end()
}
}