How do I add a wait time to a plugin?
Moderators: Moderators, Documentation Writers
-
L4M3573R
- Human

- Posts: 37
- Joined: 24 Apr 2008, 16:15
How do I add a wait time to a plugin?
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.
-
flashdbest
- Plain Yogurt

- Posts: 61
- Joined: 12 Nov 2012, 09:22
- Noob?: Yes
Re: How do I add a wait time to a plugin?
sleep(15);
-
L4M3573R
- Human

- Posts: 37
- Joined: 24 Apr 2008, 16:15
Re: How do I add a wait time to a plugin?
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?
Also would I be able to change it from on login to on login and respawn?
-
EternalHarvest
- Developers

- Posts: 1798
- Joined: 05 Dec 2008, 05:42
- Noob?: Yes
Re: How do I add a wait time to a plugin?
sleep() is not a good idea because it would stop everything.
Spawning Task::Timeout with your function should do, like in Actor::setStatus.
Spawning Task::Timeout with your function should do, like in Actor::setStatus.
-
L4M3573R
- Human

- Posts: 37
- Joined: 24 Apr 2008, 16:15
Re: How do I add a wait time to a plugin?
Sure....nevermind I don't need the help....aparently you get warnings for asking for help.