Onplayerupdate - 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: Onplayerupdate (
/showthread.php?tid=567995)
Onplayerupdate -
Rockyyy - 18.03.2015
Hey, i use Anticheat codes under 'onplayerupdate' but sounds like its lagging the server, anyway can i use a timer instead of onplayerupdate ? will it lag ? thx in advance
Re: Onplayerupdate -
CalvinC - 18.03.2015
Timers are a lot more efficient than using OnPlayerUpdate, you can make a repeating timer to check for cheaters like this:
pawn Код:
public OnGameModeInit()
{
SetTimer("MyPublic", 1000, true);
return 1;
}
forward MyPublic();
public MyPublic()
{
// Code
}
This will create a timer executing the code in MyPublic every second, 1000 milliseconds = 1 second.
Re: Onplayerupdate -
Rockyyy - 18.03.2015
Okay thanks, there is one more thing I got textdraws in my server but if a player quits it flash ( disappear & then appear) is there something wrong ? i guess my code is right as it appear onplayerspawn and disappear onplayerquit or ongamemodeexit,
PS:- im using random messages in it could it be the reason of that ?
Re: Onplayerupdate -
Rockyyy - 19.03.2015
Anyone ?
Re: Onplayerupdate -
Misiur - 19.03.2015
Sorry, without code related to that TD we can't help.