18.07.2013, 22:40
Thanks for your response
My OnPlayerUpdate
This script it's very important for my anti cheat and for my anti c-bug, if i use a timer 100ms or 200ms it's better?
And on OnPlayerKeyStateChange i use a lot of code for my Anti-Cbug or Anti Drive By driver and passenger without driver and others script but i can optimise this.
You think my code on OnPlayerUpdate and OnPlayerKeyStateChange it's too bad?
My OnPlayerUpdate
PHP код:
public OnPlayerUpdate(playerid)
{
if(EscapeTime[playerid] > 0) EscapeTime[playerid] = 0;
if(PlayerSpawned[playerid] > 0)
{
new Action = GetPlayerSpecialAction(playerid);
if(OPUAction[playerid] != Action) OPUAction[playerid] = Action;
new weapons2 = GetPlayerWeapon(playerid), ammo = GetPlayerAmmo(playerid);
if(pAntiCheat[playerid][LastWeapon] != weapons2) pAntiCheat[playerid][LastWeapon] = weapons2;
if(pAntiCheat[playerid][LastAmmo] != ammo) pAntiCheat[playerid][LastAmmo] = ammo;
}
return 1;
}
And on OnPlayerKeyStateChange i use a lot of code for my Anti-Cbug or Anti Drive By driver and passenger without driver and others script but i can optimise this.
You think my code on OnPlayerUpdate and OnPlayerKeyStateChange it's too bad?