Jump to content

[SHARE]CounterStrike sounds during pvp.


Vago

Recommended Posts

not rly

isOnline is boolean(only true or false) so u cant check if it is 1 or any other number, and by writing if(onlineplayer.isOnline()) you mean if(onlineplayer.isOnline()==false), so its not the same :)

 

What are you talking about? I just told the guy how its in freya because now its this way.

Link to comment
Share on other sites

What are you talking about? I just told the guy how its in freya because now its this way.

 

so in freya is just need to change =1 to false? or true? 1=true 0=false?

 

if (onlinePlayer.isOnline() == 1) to if (onlinePlayer.isOnline() == true)

 

or

 

if (onlinePlayer.isOnline() == 1) to if (onlinePlayer.isOnline() == false)

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Not working in last Freya Rev.

 

 

I change the imports to correct ones for L2J and if (onlinePlayer.isOnline() == 1) for if (onlinePlayer.isOnline() == true) so no errors when compile in eclipse, and yes put the files sound in the client, but not sounds in game for the killssprees what is wrong?

 

EDIT: Working now, it was couse i have Music muted in l2 settings lol! i forget the sounds come from MUSIC folder not from SOUNDS.

Link to comment
Share on other sites

  • 5 weeks later...

Not working in last Freya Rev.

 

 

I change the imports to correct ones for L2J and if (onlinePlayer.isOnline() == 1) for if (onlinePlayer.isOnline() == true) so no errors when compile in eclipse, and yes put the files sound in the client, but not sounds in game for the killssprees what is wrong?

 

EDIT: Working now, it was couse i have Music muted in l2 settings lol! i forget the sounds come from MUSIC folder not from SOUNDS.

 

If you change it to onlinePlayer.isOnline() it continues only if the value returned by the method is true (meaning if the player is online) - otherwise put !(onlinePlayer.isOnline()) and it continues only if the value returned by the method is false (if the player is offline) so there is no need for an additional boolean check. Just have a closer look at the appropriate method and you will understand what I mean.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...

    [javac] Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();

    [javac]                                                                     ^

    [javac]  symbol:  method values()

    [javac]  location: class L2TIntObjectHashMap<L2PcInstance>

    [javac] 1 error

 

BUILD FAILED

 

any idea?

Link to comment
Share on other sites

  • 2 months later...

+                        PlaySound _snd = new PlaySound(1, "enemydown", 0, 0, 0, 0, 0);

+                       

+                        Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();

                                                        ------

+                        for (L2PcInstance onlinePlayer : pls)

+                          if (onlinePlayer.isOnline() == 1)

+                          {

+                              if (onlinePlayer.getClan() != null)

+                              {

+                                if (onlinePlayer.getClan() == pk.getClan() && onlinePlayer != pk)

+                                {

+                                    onlinePlayer.sendPacket(_snd);

+                                }

+                              }

+                          }

+                 

 

 

got on values error   

Link to comment
Share on other sites

Try this

 

+                            	PlaySound _snd = new PlaySound(1, "enemydown", 0, 0, 0, 0, 0);
+                            	
+                            	Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers().values();
+                            	for (L2PcInstance onlinePlayer : pls)
+                            		if (onlinePlayer.getClan() != null)
+                            		{
+                            			if (onlinePlayer.getClan() == pk.getClan() && onlinePlayer != pk)
+                            			{
+                            				onlinePlayer.sendPacket(_snd);
+                            			}
+                            		}
+                            	

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...