This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
l2jkain
Hello, I'm doing a protection for tvt event, but I'm trying to get someone to help me? if removing else does not work
public static void AddTvTSpawnInfo(String name, int _x, int _y, int _z) { if(!CheckTvTSpawnInfo(name)) { String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } else { Object[] elements = TvTPlayerList.toArray(); for(int i=0; i < elements.length ; i++) { Splitter = ((String) elements[i]).split(":"); String nameVal = Splitter[0]; if (name.equals(nameVal)) { GetTvTSpawnInfo(name); if (_x == xx && _y == yy && _z == zz && _player.isAttackingNow() == false && _player.isCastingNow() == false && _player.isOnline() == true) { ++SameLoc; if (SameLoc >= 4)//Kick after 4 same x/y/z, location checks { //kick here TvTPlayerList.remove(i); _player.logout(); return; } else { TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":" + SameLoc; TvTPlayerList.add(temp); return; } } TvTPlayerList.remove(i); String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1"; TvTPlayerList.add(temp); } } } }
Edited by l2jkain3 answers to this question
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