April 3, 20187 yr yo so i need to make a timer what starts WHEN the script is started, after 10minutes = the script log outs & stops itself
April 3, 20187 yr public void onStart(){ startTime = System.currentTimeMillis(); endTime = startTime + 600000; } public int onLoop(){ if(endScript(){ stop(true); } } private boolean endScript(){ return System.currentTimeMillis() >= endTime; } get your startTime and endTime on the onstart, have a boolean for if currentTime is after endTime and then run a check in your onLoop for it that boolean is true
April 4, 20187 yr Author 13 hours ago, geoleo36 said: what kind of script is that bro? just wanted to learn how to make a timer Edited April 4, 20187 yr by alkku15
Create an account or sign in to comment