Question Help: Command limited, with gettickcount or gettime
#5

pawn Code:
public OnFilterScriptInit()
{
    new n = -1,time = gettime() + 5;
    while(1 != n)
    {
        if(time > gettime()) printf("lol it works.");
    }
}
With this code, it gonna spam the console saying it works until the little time over. it proofs, you did something wrong.


using the same logic, but with gettickcount it will spam for 10 seconds.
pawn Code:
public OnFilterScriptInit()
{
    new n = -1,time = GetTickCount() + 1000*10;
    while(1 != n)
    {
        if(time > GetTickCount()) printf("lol it works.");
    }
}
just try, re-look at what you did, if you copied right.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)