11.08.2014, 18:58
Some tips from my side:
1: Raise it to 3 seconds to have less lag.
2: What's the point of the multiple loops? One is enough, you should remove the:
And use the first loop you used, "i".
3: Don't ban the player right away for money hack, instead set their money back to the stat, that way they can't hack and also send a message to all admins as a warning that he might be hacking. As you might get tons of bans due to money cheat because of the Pay n Spray and the Vending machines. And yeah the OnPlayerDeath taking 100$ can also false ban too, as sometimes AntiCheat could be called before you give the 100$ back.
Hope these suggestions will help you, also get the include from Emmet_ with vending machines and make a check for vending machines or remove all the vending machines.
EDIT: I think that your major issue of it not being called properly is caused by that double loop, not sure tho.
EDIT2: Use the whole anti cheat in just 1 timer and callback, that means make a complete check for all weapons, money, everything else you got the check for instead of making 1 timer for money, 1 for weapons, etc. Otherwise it has a bigger chance of lagging as multiple timers will be called at same time.
1: Raise it to 3 seconds to have less lag.
2: What's the point of the multiple loops? One is enough, you should remove the:
pawn Код:
for(new b=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(b))
3: Don't ban the player right away for money hack, instead set their money back to the stat, that way they can't hack and also send a message to all admins as a warning that he might be hacking. As you might get tons of bans due to money cheat because of the Pay n Spray and the Vending machines. And yeah the OnPlayerDeath taking 100$ can also false ban too, as sometimes AntiCheat could be called before you give the 100$ back.
Hope these suggestions will help you, also get the include from Emmet_ with vending machines and make a check for vending machines or remove all the vending machines.
EDIT: I think that your major issue of it not being called properly is caused by that double loop, not sure tho.
EDIT2: Use the whole anti cheat in just 1 timer and callback, that means make a complete check for all weapons, money, everything else you got the check for instead of making 1 timer for money, 1 for weapons, etc. Otherwise it has a bigger chance of lagging as multiple timers will be called at same time.