Raised This Month: $ Target: $400
 0% 

SayText hook


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-04-2006 , 04:14   SayText hook
Reply With Quote #1

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()     } }

So, question is, how would I block only the "%s changed name to %s" message?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
BAILOPAN
Join Date: Jan 2004
Old 04-04-2006 , 04:15  
Reply With Quote #2

use register_message from engine
__________________
egg
BAILOPAN is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 04-04-2006 , 04:17  
Reply With Quote #3

gratzi BAIL.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-04-2006 , 04:32  
Reply With Quote #4

Check out my Grenade Sack plugin ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply



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 16:44.


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