20.04.2015, 11:20
Hey, So basically I wanna make an infinite timer without making the repeat to true, So inside the timer's code... I'd like to check if a certain condition is true.. and not SetTimerEx the same function again inside it.
However, That crashed the server.
Is there any way or any fix that allows me to that, Thanks in advance.
And if you don't get me, here is example:
However, That crashed the server.
Is there any way or any fix that allows me to that, Thanks in advance.
And if you don't get me, here is example:
PHP код:
new bool:certainCondition = false;
public OnPlayerConnect(playerid)
{
SetTimerEx("FUNC", 1000, 0, "d", playerid);
{
forward FUNC(playerid);
public FUNC(playerid)
{
if(!certainCondition) return SetTimerEx("FUNC", 1000, 0, "d", playerid); //This cause crash.
else {
//code here
}
}