alkku15 Posted April 3, 2018 Posted April 3, 2018 yo so i need to make a timer what starts WHEN the script is started, after 10minutes = the script log outs & stops itself
GPSwap Posted April 3, 2018 Posted April 3, 2018 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 2
alkku15 Posted April 4, 2018 Author Posted April 4, 2018 (edited) 13 hours ago, geoleo36 said: what kind of script is that bro? just wanted to learn how to make a timer Edited April 4, 2018 by alkku15