Hi all,
I'm attempting to create a function that should be triggered with a certain delay. However I notice that this doesn't work if there is no player on the server. From the moment a player joins the server then the timer works.
PHP Code:
public void OnMapStart() {
LogMessage("!!!SOME OUTPUT"); // => THIS IS OUTPUTTED
CreateTimer(3.0, SomeFunction);
}
public Action SomeFunction(Handle timer)
{
LogMessage("!!! SOME MORE OUTPUT."); // => THIS IS NOT OUTPUTTED
}
So when the server boots, OnMapStart is triggered and the first message is outputted. The timer should be created but it never triggers.
When a player joins, the OnMapStart has triggered again (I don't really understand why), and then both messages are outputted.
Why is this? Can you create timers without players on a server somehow?