Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
Hey guys,
What should i use to avoid players from getting any weapons through hacks, a timer or OnPlayerUpdate?
I think a timer would be better, since it doesnt gets called like 30+ (rough guess) in a second
What do you guys think?
~Wesley
Posts: 7,801
Threads: 187
Joined: Feb 2010
Reputation:
0
OnPlayerUpdate was made for use of an efficient anti-cheat. Just don't put things under there which will take forever to process.
Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
So if i would add 'if( PlayerInfo[playerid][pAdmin] < 3 ) ResetPlayerWeapons(playerid);', then it wouldnt lagg the server that much; right?
Posts: 1,079
Threads: 64
Joined: Jan 2010
Quote:
Originally Posted by Wesley221
So if i would add 'if( PlayerInfo[playerid][pAdmin] < 3 ) ResetPlayerWeapons(playerid);', then it wouldnt lagg the server that much; right?
|
It won't lagg so much that it's unplayable :P
Posts: 1,317
Threads: 23
Joined: Feb 2010
Reputation:
0
I use schedule code under my OPU, for example make it so certain code only gets called every second, or each 20 updates. That way you still use OPU and the server doesen't have to process another timer.
Posts: 1,564
Threads: 98
Joined: Apr 2011
Reputation:
0
Thats actually pretty useful, never thought of that
Thanks!