Author Topic: sending a console command every so often  (Read 401 times)

what function would i use if i wanted to make a script that sent a console command, say, every 10th of a second?

Schedule(10,0,functioname,arg1,arg2,arg3,etcargs);

For example:

function loopFunction(%arg1,%arg2)
{
   if(isEventPending($loopSchedule))
      cancel($loopSchedule);
      
   //code to do stuff goes here
   
   $loopSchedule = schedule(10,0,loopFunction,%arg1,%arg2);
}
« Last Edit: December 23, 2011, 02:41:09 AM by Superb »