Play time randomly goes up when player goes afk
#7

The thing is.. The timer gets bugged or something.. If you tab out for 5 minutes it adds like 1-2 hours to pHours

pawn Код:
public OnPlayerUpdate(playerid)
{
    AFKCheck[playerid] = 5;
    SetTimerEx("AfkTimer", 1000, 1, "i", playerid);
    return 1;
}

forward AfkTimer(playerid);
public AfkTimer(playerid)
{
    AFKCheck[playerid]--;
    if (AFKCheck[playerid] < 3)
    {
        AFK[playerid] = 1;
        SendClientMessage(playerid, COLOR_ORANGE, "Debug - Now afk");
    }
    else
    {
        AFK[playerid] = 0;
    }
}
I tried this, but it just spams the message of afk, even when not afk?

Using the include now, when does it classify the player as afk?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)