Thank you! ;)
On Fri, 4 Mar 2005 10:05:15 -0800, Yahn Bernier <[EMAIL PROTECTED]> wrote: > Use: > > CBroadcastRecipientFilter filter; > > Instead of CSingleUserRecipientFilter > > (there are other convenient filters in recipientfilter.h) > > Yahn > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Erik K > Sent: Friday, March 04, 2005 3:38 AM > To: hlcoders@list.valvesoftware.com > Subject: [hlcoders] 2 quick questions > > There are 2 things i'm trying to accomplish at the moment. > > First I would like to know how to play a sound on all players. Right now > I use the following code to play a sound when a player captures a > flag: > > EmitSound( "Flag.Captured" ); > > but that only plays the sound on the client if he's close enough to the > captured flag. How do I play a sound on all players, no mather how far > they are away from a captured flag? > > Second thing is how to send a UserMessage to all clients. I only know > how to send one to one particular player: > > CSingleUserRecipientFilter filter ( this ); // set recipient > filter.MakeReliable(); // reliable transmission > > UserMessageBegin( filter, "MyMessage" ); // create message WRITE_BYTE( 1 > ); // fill message WRITE_BYTE( 0 ); // fill message MessageEnd(); //send > message > > What do I need to do to send it to all connected players? > > Thanks in advance, > > Erikk > > _______________________________________________ > 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 > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders