SA-MP Forums Archive
What would happen if i set AC 100MS - 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: What would happen if i set AC 100MS (/showthread.php?tid=369900)



What would happen if i set AC 100MS - No Fear - 18.08.2012

Hey, what would happen if i set AC timer to 100MS, would i couse alot of lagg? Players 20-50 at one time.


Re: What would happen if i set AC 100MS - Babul - 18.08.2012

at the very beginning of the callback, add
pawn Код:
public AntiCheat(blabla);
    new debugtime=GetTickCount();

//your AC stuff inside. could be...
//
//very
//
//long. and at its end, add:

    debugtime=GetTickCount()-debugtime;
    new debugstring[32];
    format(debugstring,sizeof(debugstring),"%d",debugtime);
    GameTextForAll(debugstring,500,5);
//  return 1; //no need to insert this, you already got that return 1. but to illustrate the gametext should be at the very end.
}
then play and watch the gametext(-s annoying all players). it shows the milliseconds the whole AC-checks need. if you set the timer to a lower value than the ms shown ingame, then it will perhaps skip one iteration...