Code snippet:
bf_write *pWrite;
pWrite = engine->UserMessageBegin();
pWrite->WriteByte();
pWrite->WriteFloat();
pWrite->WriteString();
engine->MessageEnd();
This is working for me. Maybe you have to include the
header files for bf_write. Not all usermessages are
working in all mods, especially HudMsg isnt working
in Counterstrike.
Greets
Ronny
----- Original Message -----
From: "Manip" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, December 08, 2004 5:13 AM
Subject: [hlcoders] UserMessage? Ahh!
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Please, I just spent four hours trying and I can't figure out how to make
a
usermessage.
I want to get_type for a text message using usermessage->get_type(const
char ) or something like that, then I want to fill the buffer with a few
things (bytes, floats, etc) and then MessageEnd().
I can do the first two (UserMessageBegin(), MessageEnd()) via the engine
interface easily enough but how do you fill the buffer? I tried messing
around with bf_write, now I feel suicidal..
I also can't figure out how to set the thing up to allow you to query the
type (int) of a usermessage (char)? I see the code and I tried just
moving
it all around but ended up with 6 unresolved symbols and the strings
holding
it all together started to come apart and now I can't even remember what
the
logic was with copying stuff out of the headers.. ?
If you don't know the answer and think a trip though the SDK will allow
you
to figure it out then I advise you to stop now, you will regret it if you
do.
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders