Raised This Month: $51 Target: $400
 12% 

[MM-PLUGIN] CUserMessages question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
payas
New Member
Join Date: Jul 2010
Old 07-22-2010 , 01:08   [MM-PLUGIN] CUserMessages question
Reply With Quote #1

hi everyone, I downloaded HLSDK-OB and mmSource1.8 to develop a server plugin.
I started with the sample_mm, everything works just fine I compile it, installed and server works ok.

now, the problem.. I'm trying to register a custom user message using usermessages->Register("myMessage")

but, I can compile it, I declared:
extern CUserMessages *usermessages;

And the linker is giving me this error:
error LNK2001: unresolved external symbol "class CUserMessages * usermessages"

Does anybody knows the name of the library (.lib) where this object is declared???
Or a way to obtain it?

regards
payas is offline
neo_gis
Member
Join Date: Sep 2009
Location: Rabat
Old 07-22-2010 , 04:59   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #2

that error means the compiler cannot find your object , make sure you included all necessary header files.
__________________
neo_gis is offline
Send a message via MSN to neo_gis Send a message via Skype™ to neo_gis
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 07-22-2010 , 08:17   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #3

It doesn't make any sense to register new messages since you need to do that on both client and server, and you have luckily only access to the server.

Chris
Chrisber is offline
payas
New Member
Join Date: Jul 2010
Old 07-22-2010 , 10:02   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #4

Quote:
Originally Posted by Chrisber View Post
It doesn't make any sense to register new messages since you need to do that on both client and server, and you have luckily only access to the server.

Chris
that's the point, I can intercept and process user messages on different clients. I'm looking for an easy way to do this on server, otherwise I will perform a signature scanning.


Quote:
Originally Posted by neo_gis View Post
that error means the compiler cannot find your object , make sure you included all necessary header files.
this is not the compiler, it's the linker, and the problem is not the class definition, the problem is the declaration.
payas is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 07-22-2010 , 10:12   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #5

The point Chrisber was trying to make is even if you were able to register your own usermessage, it would do no good because the client wouldn't know what to do with it and would ignore it. What are you trying to do? Maybe there is a better way than using usermessages.
Keeper is offline
payas
New Member
Join Date: Jul 2010
Old 07-22-2010 , 10:38   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #6

Quote:
Originally Posted by Keeper View Post
The point Chrisber was trying to make is even if you were able to register your own usermessage, it would do no good because the client wouldn't know what to do with it and would ignore it. What are you trying to do? Maybe there is a better way than using usermessages.
I understand what Chrisber mean, like I say, I can hook user messages on client. I just need to register those messages in server.

this is impossible with the standard plugin system, I was hoping that it can be solved with the MM-Source like the old int RegUserMsg(const char *pszName, int iSize) from HL1 server.
payas is offline
BAILOPAN
Join Date: Jan 2004
Old 07-23-2010 , 04:26   Re: [MM-PLUGIN] CUserMessages question
Reply With Quote #7

There is no conceptual difference between the messaging system of HL1 and HL2, and what you're asking for has nothing to do with plugins. User messages are built on top of a low-level messaging protocol - the user message type is an arbitrary 8-bit field following the service type (svc_usermessage in this case). The server doesn't care what it is or what data follows. It just sends it across the wire.

The game client does care about the type & payload, in order to decode the message and route it (IClientDLL::DispatchUserMessage). I don't even want to know what you're planning for that.
__________________
egg
BAILOPAN 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 19:06.


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