SA-MP Forums Archive
AntiCheat timer? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: AntiCheat timer? (/showthread.php?tid=72273)



AntiCheat timer? - Luka P. - 07.04.2009

Hi,i created my first FS,a AntiCheat..
I used OnPlayerUpdate function to chech if player are cheater.

Pastebin

That`s the script...is there any better solution to check cheat every 5 seconds with timer,not on every player update?
This is my first FS so i don`t know,i never creating AntiCheat...



ScorpioN,
Sorry for my bad english.



Re: AntiCheat timer? - ICECOLDKILLAK8 - 07.04.2009

OnPlayerUpdate can be called more than 5 times a second, So its best to leave it in OnPlayerUpdate, The only other solution is to use a timer


Re: AntiCheat timer? - Luka P. - 07.04.2009

that i said..i want use timer..but how to use it in anticheat i don`t know?



Re: AntiCheat timer? - Rks25 - 07.04.2009

Quote:
Originally Posted by JeNkStAX
OnPlayerUpdate can be called more than 5 times a second, So its best to leave it in OnPlayerUpdate, The only other solution is to use a timer



Re: AntiCheat timer? - Luka P. - 07.04.2009

Read the post,and then reply!

Quote:
Originally Posted by ScorpioN | scorp60.tk
Hi,i created my first FS,a AntiCheat..
I used OnPlayerUpdate function to chech if player are cheater.

Pastebin

That`s the script...is there any better solution to check cheat every 5 seconds with timer,not on every player update?
This is my first FS so i don`t know,i never creating AntiCheat...



ScorpioN,
Sorry for my bad english.
You just about 5 times in minute,i said 5 seconds!


Re: AntiCheat timer? - gijsmin - 07.04.2009

OnPlayerupdate makes the ping High!


Re: AntiCheat timer? - Rks25 - 07.04.2009

SetTimer and than a loop?


Re: AntiCheat timer? - ICECOLDKILLAK8 - 07.04.2009

OnPlayerUpdate gets called more than every 5 seconds, It gets called around every quarter of a second, So just leave it in OnPlayerUpdate


Re: AntiCheat timer? - Weirdosport - 07.04.2009

It depends how many players you'll have on the server.. If very few it might be preferable to use OnPlayerUpdate.. because using a timer with a loop within it would be inefficient.

However if you had a server that was near capacity (198/200) You would want to stay well clear of OnPlayerUpdate, as it would be being called hundreds of times a second.. Every time a player changed their weapon, or moved, or did anything it would be called..


Re: AntiCheat timer? - Luka P. - 07.04.2009

ok,thanks...i have 60-70/200 players online...
Leave in OnPlayerUpdate?