30.03.2014, 08:04
Why SetTimerEx dangerous? And PVar is cool?
static Timer[MAX_PLAYERS][2], bool:TimerRepeat[MAX_PLAYERS][2];
public OnPlayerUpdate(playerid)
{
if(gettime() - Timer[playerid][0] > 3 && TimerRepeat[playerid][0] == false)
{
SendClientMessage(playerid, -1, "3 seconds have passed and this message will not be shown again.");
Timer[playerid][0] = gettime();
}
if(gettime() - Timer[playerid][1] > 3 && TimerRepeat[playerid][1] == true)
{
SendClientMessage(playerid, -1, "3 seconds have passed and this message will be shown again in 3 seconds.");
Timer[playerid][1] = gettime();
}
return 1'
}