AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Finding Message ID (https://forums.alliedmods.net/showthread.php?t=53956)

mysticssjgoku4 04-14-2007 05:55

Finding Message ID
 
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 :D.

--------
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

VEN 04-14-2007 08:12

Re: Finding Message ID
 
Code:
if (get_msg_arg_int(1) == TE_TEXTMESSAGE)         // something

mysticssjgoku4 04-14-2007 08:21

Re: Finding Message ID
 
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.

VEN 04-14-2007 09:57

Re: Finding Message ID
 
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.

mysticssjgoku4 04-14-2007 23:06

Re: Finding Message ID
 
There has to be a way to do it.
Any other suggestions?

VEN 04-15-2007 04:24

Re: Finding Message ID
 
Use Message Logging plugin by Damaged Sould to get exact message that you are looking for.


All times are GMT -4. The time now is 06:38.

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