SA-MP Forums Archive
Timers go off too early - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timers go off too early (/showthread.php?tid=536332)



Timers go off too early - DTV - 09.09.2014

pawn Код:
ThirstLowerTimer[playerid] = SetTimerEx("ThirstLower", 60000, true, "i", playerid);

forward ThirstLower(playerid);
public ThirstLower(playerid)
{
    Player[playerid][Thirst]--;
    if(Player[playerid][Thirst] == 10)
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Your thirst level is at 10 percent.  Drink something soon or you will die.");
    }
    else if(Player[playerid][Thirst] == 0)
    {
        SetPlayerHealth(playerid, 0);
        Player[playerid][Thirst] = 100;
    }
    return 1;
}
The timer above should be called once every minute, meaning that it should take about an hour and a half for the player's thirst to reach 10 (assuming it starts at one hundred). However, I've had reports from players saying that their thirst hits 10 within 20-30 minutes. This happens with other timers such as a hunger and xp gain timer. Anyone got a clue of how this happens?


Re: Timers go off too early - Pottus - 09.09.2014

Timers in SAMP are not accurate read here.

https://sampforum.blast.hk/showthread.php?tid=375925