hello i try make a counter but is not show if is start
i need little help tnx
here is the code
long timer;
private ScheduledFuture<?> _startCounter = null;
public void CounterStart()
{
timer = 1000*50;
_startCounter = ThreadPoolManager.getInstance().scheduleAiAtFixedRate(new Runnable()
{
@Override
public void run()
{
countDown(); // start counter
}
}, 1000 * 10, 1000); // return counter 1 second
}
public void countDown()
{
int seconds = (int) (timer / 1000);
seconds--;
switch (seconds)
{
case 3600: // 1 hour left
case 1800: // 30 minutes left
case 900: // 15 minutes left
case 600: // 10 minutes left
case 300: // 5 minutes left
Announcements.getInstance().gameAnnounceToAll("test300");
break;
case 240: // 4 minutes left
Announcements.getInstance().gameAnnounceToAll("test240");
break;
case 180: // 3 minutes left
Announcements.getInstance().gameAnnounceToAll("test180");
break;
case 120: // 2 minutes left
Announcements.getInstance().gameAnnounceToAll("test120");
break;
case 60: // 1 minute left
Announcements.getInstance().gameAnnounceToAll("test60");
break;
case 30: // 30 seconds left
Announcements.getInstance().gameAnnounceToAll("test30");
break;
case 15: // 15 seconds left
Announcements.getInstance().gameAnnounceToAll("test15");
break;
case 10: // 10 seconds left
Announcements.getInstance().gameAnnounceToAll("test10");
break;
case 3: // 3 seconds left
Announcements.getInstance().gameAnnounceToAll("test3");
break;
case 2: // 2 seconds left
Announcements.getInstance().gameAnnounceToAll("test2");
break;
case 1: // 1 seconds left
Announcements.getInstance().gameAnnounceToAll("test1");
break;
case 0:
_startCounter.cancel(true);
ChangeZone();
}
}
DISCORD :
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/hood-services
https://campsite.bio/utchihaamkt
hello everyone !
I need help with a l2script Rev H5-Salvation/Classic build. I compiled the project, installed everything but I can't log in to the server, it won't log me in. I tried a thousand ways without good results. I leave you the error when logging in either with the H5-Salvation Client.
ERROR ---> WARN: IPBANMANAGER ---> IP !!!!
I'm waiting for help! Thank you!
Question
tazerman2
hello i try make a counter but is not show if is start
i need little help tnx
here is the code
Edited by tazerman24 answers to this question
Recommended Posts