timer bug? or error?
#1

Hey, I assigned a timer "vtimer" to remove 1 value from the variable "vTime" every 10 seconds.

The problem is that, for a brief moment it works ok. Then it has some sort of "spike" and it removes 2 values instead of one.

Is this a SetTimerEx bug or sth? Is there a fix you know?

Thanks
Reply
#2

Can you show the code?
Reply
#3

pawn Код:
// ongamemodeinit
foreach(new vid : Vehicle)
    {
        SetTimerEx("FuelDown",10000,true,"i",vid);
    }

//Below code, the function (forwarded)
public FuelDown(vid)
{
    foreach (new playerid : Player)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            vid = GetPlayerVehicleID(playerid);
            VInfo[vid][vFuel] --;
            printf("Fuel = %d",VInfo[vid][vFuel]);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)