mfausb Posted March 27, 2011 Posted March 27, 2011 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.
monaliza Posted March 27, 2011 Posted March 27, 2011 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)
brett16 Posted April 6, 2011 Posted April 6, 2011 How do you edit how many kills you need to play whatever sound file?
brett16 Posted April 6, 2011 Posted April 6, 2011 How do you edit how many kills you need to play whatever sound file?
Chakl22 Posted May 9, 2011 Posted May 9, 2011 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.
mfausb Posted June 8, 2011 Posted June 8, 2011 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.
monaliza Posted October 12, 2011 Posted October 12, 2011 [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?
N3uTr0n Posted December 31, 2011 Posted December 31, 2011 + 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
SweeTs Posted December 31, 2011 Posted December 31, 2011 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); + } + } +
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now