25.05.2016, 13:48
Hi. Which is more efficient and faster ?
I will use for anti cheats/hacks but player connect the server lag problems.
For Example:
- GetTickCount:
- Call a public/stock functions:
I will use for anti cheats/hacks but player connect the server lag problems.
For Example:
- GetTickCount:
Код:
new count[MAX_PLAYERS];
Код:
public OnPlayerUpdate(playerid) { if(GetTickCount() - count[playerid] > 1000){ count[playerid] = GetTickCount(); new Float:animX, Float:animY, Float:animZ; new anim = GetPlayerAnimationIndex(playerid); GetPlayerPos(playerid, animX, animY, animZ); if((anim >= 1538) && (anim <= 1544) || (anim == 1250) || (anim == 1062) && animZ > 5 || animZ > -5){ BanEx(playerid, "Anim Hack");} return 0; } return 1; }
Код:
public OnPlayerConnect(playerid){ SetTimerEx("Bla", 1000, true, "i", playerid); return 1; }
Код:
forward Bla(playerid); public Bla(playerid){ new Float:animX, Float:animY, Float:animZ; new anim = GetPlayerAnimationIndex(playerid); GetPlayerPos(playerid, animX, animY, animZ); if((anim >= 1538) && (anim <= 1544) || (anim == 1250) || (anim == 1062) && animZ > 5 || animZ > -5){ BanEx(playerid, "Anim Hack");} return true; }