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