Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
sending a console command every so often
« previous
next »
Print
Pages: [
1
]
Author
Topic: sending a console command every so often (Read 401 times)
stuntman021
December 23, 2011, 02:02:30 AM
what function would i use if i wanted to make a script that sent a console command, say, every 10th of a second?
Ad Bot
Advertisement
Superb
December 23, 2011, 02:39:20 AM
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
»
stuntman021
December 23, 2011, 06:09:41 AM
thanks, locking
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
sending a console command every so often