Raised This Month: $ Target: $400
 0% 

SVC_INTERMISSION


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 17:25   SVC_INTERMISSION
Reply With Quote #1

Hello. The problem is with register_message(SVC_INTERMISSION..
While using Galileo(http://forums.alliedmods.net/showthread.php?t=77391) I'm trying to hook this event with another plugin that way:
Code:
register_message(SVC_INTERMISSION, "Message_Intermission");
Of course in Galileo we have:
Code:
message_begin(MSG_ALL, SVC_INTERMISSION);
 message_end();
And the problem is that another plugin can't catch this message.
public Message_Intermission won't load. Any solutions or explanations?
FiFiX is offline
Send a message via Skype™ to FiFiX
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 17:27   Re: SVC_INTERMISSION
Reply With Quote #2

Messages sent with message_begin() cannot be hooked.
The message has to be sent with emessage_begin() (and appropriate e*() functions instead of the normal ones) to be hooked.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 17:55   Re: SVC_INTERMISSION
Reply With Quote #3

Can You give me an example ?
FiFiX is offline
Send a message via Skype™ to FiFiX
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-19-2011 , 17:57   Re: SVC_INTERMISSION
Reply With Quote #4

emessage_begin(MSG_ALL, SVC_INTERMISSION);
emessage_end();
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 18:01   Re: SVC_INTERMISSION
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
and appropriate e*() functions instead of the normal ones)
I meant that part. Sorry.
FiFiX is offline
Send a message via Skype™ to FiFiX
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-19-2011 , 18:06   Re: SVC_INTERMISSION
Reply With Quote #6

message.inc :

Code:
/* These functinos are used to generate client messages.
 * You may generate menu, smoke, shockwaves, thunderlights,
 * intermission and many many others messages.
 * See HL SDK for more examples. */
native message_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
native message_end();
native write_byte(x);
native write_char(x);
native write_short(x);
native write_long(x);
native write_entity(x);
native write_angle(x);
native write_coord(x);
native write_string(const x[]);

/* These are the same as above, except that the messages sent
 *  are also sent to all other plugins and Metamod plugins.
 * This means that if you send one of these messages, other plugins will
 *  be notified, which was previously impossible.  
 * BE CAREFUL! Using these incorrectly, or not for their intended purpose,
 *  could cause infinite recursion or something just as bad. 
 * NOTE! These natives are experimental.
 */
native emessage_begin(dest, msg_type, const origin[3] = {0,0,0}, player = 0);
native emessage_end();
native ewrite_byte(x);
native ewrite_char(x);
native ewrite_short(x);
native ewrite_long(x);
native ewrite_entity(x);
native ewrite_angle(x);
native ewrite_coord(x);
native ewrite_string(const x[]);
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 18:15   Re: SVC_INTERMISSION
Reply With Quote #7

And hook part in other plugin won't change? Am I correct?
FiFiX is offline
Send a message via Skype™ to FiFiX
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 19:06   Re: SVC_INTERMISSION
Reply With Quote #8

Echm, when I changed it for:
Code:
emessage_begin(MSG_ALL, SVC_INTERMISSION);
emessage_end();
Server dies while map change... Any ideas?
FiFiX is offline
Send a message via Skype™ to FiFiX
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-19-2011 , 19:50   Re: SVC_INTERMISSION
Reply With Quote #9

Same when you disable your "another plugin" ?
__________________
Arkshine is offline
FiFiX
Senior Member
Join Date: May 2008
Location: Poland
Old 06-19-2011 , 19:52   Re: SVC_INTERMISSION
Reply With Quote #10

Yes. However if it isn't disabled it works as it should.
FiFiX is offline
Send a message via Skype™ to FiFiX
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 13:41.


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