View Single Post
Re: Messaging system
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Messaging system - 13-02-2004

If you use metamod, you can use the GET_USER_MSG_ID (PLID, "Health", NULL); macro to get the message ID for Health messages.

If you don't use metamod, you have to keep track yourself of who's who, by hooking pfnRegUserMsg() and checking the return values. pfnRegUserMsg() is called by the MOD when the server boots up so that the MOD can register its network messages to the engine ; the engine replies back with a message ID that will be associated to that message name. By hooking this function you can build yourself a table where you'll look up which message ID corresponds to which message name, and vice versa.

BTW, learning everything that is to learn in the world is a really nice hobby. Keep it up



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote