You'll need to catch the SayText event in a manner similar to how we catch
all the events in SM.

i.e...  establish a mapping along the lines of....
gmsgSayText = GET_USER_MSG_ID(PLID, "SayText", NULL );
modMsgs[gmsgSayMsg ].function = Server_SayText;

to...
void Server_SayText(void* mValue) {}

This a dramatic oversimplification. Pull down the SM source and it'll show
the framework required.


----- Original Message -----
From: "Brian A. Stumm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 02/09/04 11:27 PM
Subject: Re: [hlcoders] Server say (chat) messages


>
> apparently I am missing something. I've been after this data for nearly 2
> months now and been down the pfnWriteString road before with no luck. But
> since alfred pointed me here again I had another go, still no luck.
>
> If I'm allowed may I call in a favor?
>
> Shouldn't this at least stuff the server say message into my file? What am
> I missing here?
>
>
> [CODE]
> void pfnWriteString( const char * sz )
> {
>         if (gpGlobals->deathmatch)
>         {
>
>                 fp=fopen("phpua_log.txt","a");
>                 fprintf(fp,"pfnWriteString: %s\n",sz);
>                 fclose(fp);
>
> 8<---SNIP---
> [/CODE]
>
>
> Alfred suggested:
>
> [CODE]
>               PF_MessageBegin_I( MSG_ONE, RegUserMsg( "SayText", -1 ),
NULL, &sv.edicts[j+1] );
>                       PF_WriteByte_I( 0 );
>                       PF_WriteString_I( text );
>               PF_MessageEnd_I();
> [/CODE]
>
> is WriteString_I different? I figured it as a difference between MM and
> SDK. What am I missing?
>
> for what its worth i AM seeing other WriteString messages. Im also logging
> pfnMessageBegin to that file and seeing other SayText messages in there
> too. Im pulling my hair out here. Surely I'm missing the obvious...
>
> ARGGGG HELP!
>
>
>
> _______________________________________________
> 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

Reply via email to