08.05.2014, 22:20
Hello, is there a way to detect if a timer still running ?
forward MyTimer();
new MyVariable[MAX_PLAYERS]; // let's create the function
public MyTimer()
{
MyVariable[playerid] = 1;
return 1;
}
// To use the timer
SetTimer("MyTimer", time, false / true);
// Now let's verify if the variable is 1
if(MyVariable[playerid] == 1)
{
// doo something here //
return 1;
}
forward MyTimer();
new MyVariable = 0; // let's create the function
public MyTimer()
{
MyVariable= 1;
return 1;
}
// To use the timer
SetTimer("MyTimer", time, false / true);
// Now let's verify if the variable is 1
if(MyVariable == 1)
{
// doo something here //
return 1;
}