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

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
thaiscorpion
Posts: 30
Joined: Thu Sep 01, 2011 3:57 am

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

Post 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!
Last edited by thaiscorpion on Thu Sep 22, 2011 10:22 am, edited 1 time in total.
thaiscorpion
Posts: 30
Joined: Thu Sep 01, 2011 3:57 am

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

Post 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!!
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

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

Post by tukune »

Broadcast.toAllOnlinePlayers(new PlaySound(1, "sound", 0, 0, 0, 0, 0));
thaiscorpion
Posts: 30
Joined: Thu Sep 01, 2011 3:57 am

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

Post by thaiscorpion »

What is the diference between both?
Post Reply