SA-MP Forums Archive
Help with command speed test - 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: Help with command speed test (/showthread.php?tid=525620)



Help with command speed test - BlackM - 13.07.2014

Ok, so I wanted to clock two similar commands I made, each one doing the same thing but in different ways, I used:
Код:
CMD:command(playerid, params[])
{
    new start = GetTickCount();
    for(new z; z < 1000; z++)
    {
       // the command code here
    }
    new end = GetTickCount();
    printf("Time: %04d", end - start);
    return 1;
}
However, when I test the command out it loops only twice then sends "Server Unknown Command", also nothing shows up in the console. Can any one help me out plz?


Re: Help with command speed test - Battlezone - 13.07.2014

Check your returns inside the loop