Page 1 of 1

How do I add a wait time to a plugin?

Posted: 17 Dec 2012, 20:57
by L4M3573R
I don't know anything about the plugins(not that I haven't tried to use them...just I don't understand it). How would I add a wait time before the plugin initializes? I'm trying to add a 15 second wait time to cmdOnLogin before it does the commands.

Re: How do I add a wait time to a plugin?

Posted: 17 Dec 2012, 20:58
by flashdbest
sleep(15);

Re: How do I add a wait time to a plugin?

Posted: 17 Dec 2012, 21:07
by L4M3573R
Where on the plugin do I put it? I tried placing it in a few places and it made Openkore freeze for 15 seconds before the login.
Also would I be able to change it from on login to on login and respawn?

Re: How do I add a wait time to a plugin?

Posted: 18 Dec 2012, 04:34
by EternalHarvest
sleep() is not a good idea because it would stop everything.

Spawning Task::Timeout with your function should do, like in Actor::setStatus.

Re: How do I add a wait time to a plugin?

Posted: 18 Dec 2012, 10:05
by L4M3573R
Sure....nevermind I don't need the help....aparently you get warnings for asking for help.