Page 1 of 1

[HELP] How to send sound to all the players [SOLVED]

Posted: Thu Sep 22, 2011 8:09 am
by thaiscorpion
L2J Revision 4912:
L2JDP Revision 8362:

Hi im trying to send a sound message globally to all players, i can send sound like this:

Code: Select all

   PlaySound _snd1 = new PlaySound(1, "sound", 0, 0, 0, 0, 0);   sendPacket(_snd1);
But only the player who activated this hears it, is there a way to send the sound globally to all the players online? or in that area? ty!

Re: [HELP] How to send sound to all the players

Posted: Thu Sep 22, 2011 10:22 am
by thaiscorpion
Okey fixed it I did it this way:

Code: Select all

broadcastPacket(new PlaySound(1, "sound", 0, 0, 0, 0, 0));
The broadcastPacket(); sends the pack globally to all players online.

Gl!!

Re: [HELP] How to send sound to all the players [SOLVED]

Posted: Thu Sep 22, 2011 1:36 pm
by tukune
Broadcast.toAllOnlinePlayers(new PlaySound(1, "sound", 0, 0, 0, 0, 0));

Re: [HELP] How to send sound to all the players [SOLVED]

Posted: Thu Sep 22, 2011 3:30 pm
by thaiscorpion
What is the diference between both?