28.05.2020, 14:23
Quote:
How to activate a timer like that only if a variable is 1;
PHP Code:
how to make that? I don't wanna to work in background each second and do nothing |
PHP Code:
new Timer:mytimer[MAX_PLAYERS] = {Timer:-1, ...};
PHP Code:
if(MyVariable[playerid] == 1)
mytimer[playerid] = repeat MyFunction(playerid);
PHP Code:
if(mytimer[playerid] != Timer:-1)
{
stop mytimer[playerid];
mytimer[playerid] = Timer:-1;
}