Raised This Month: $ Target: $400
 0% 

Finding Message ID


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 04-14-2007 , 05:55   Finding Message ID
Reply With Quote #1

Also, as I read here, I'm not exactly how Avalanche described us using register_message to find the message id of name sending through the hud, so I was wondering if anyone could perhaps explain how that even works, because I tried putting something together for testing phases, and wound up getting "Invalid parameter 28" or something like that.

http://forums.alliedmods.net/showthread.php?t=46431

Capturing temp entities with registering a message? :S. I'm baffled heh.

Thanks in advance .

--------
Update:

Code:
plugin plugin_init() {     register_message(SVC_TEMPENTITY,"test_mess") } #define TE_TEXTMESSAGE    29 public test_mess(msg_id, msg_dest, msg_entity) {     server_print("MSG ID: %i",msg_id)     server_print("MSG DEST: %i",msg_dest)     server_print("MSG ENT: %i",msg_entity)     }

.....Returns
MSG ID: 23
MSG DEST: 5
MSG ENT: 0

ONLY one time when the player joins the server. Doesn't display if a players changes his name. Doesn't display if you look at a player.
:S
__________________


Last edited by mysticssjgoku4; 04-14-2007 at 06:30.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
VEN
Veteran Member
Join Date: Jan 2005
Old 04-14-2007 , 08:12   Re: Finding Message ID
Reply With Quote #2

Code:
if (get_msg_arg_int(1) == TE_TEXTMESSAGE)         // something
VEN is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 04-14-2007 , 08:21   Re: Finding Message ID
Reply With Quote #3

Aye, how would I determine what the message id is?
That is...to register the message, because SVC_TEMPENTITY only is called once, when the player joins the server.
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
VEN
Veteran Member
Join Date: Jan 2005
Old 04-14-2007 , 09:57   Re: Finding Message ID
Reply With Quote #4

msg_id is you message id (Temp Entity message).
get_msg_arg_int(1) can tell you what kind of TE type do you have (like TE_TEXTMESSAGE).
To see full TE_* list see message_const.inc.

If it called once then probably it should be like that and here nothing you can do unless something weird like scripting mistake was made.

Last edited by VEN; 04-14-2007 at 10:04.
VEN is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 04-14-2007 , 23:06   Re: Finding Message ID
Reply With Quote #5

There has to be a way to do it.
Any other suggestions?
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
VEN
Veteran Member
Join Date: Jan 2005
Old 04-15-2007 , 04:24   Re: Finding Message ID
Reply With Quote #6

Use Message Logging plugin by Damaged Sould to get exact message that you are looking for.
VEN is offline
Reply


Thread Tools
Display Modes

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 06:38.


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