16.11.2016, 12:05
Don't ever use these kinds of stuff in OnPlayerUpdate, use a timer for that.
PHP код:
// Variables
new acT;
// OnGameModeInit
acT = SetTimer("AntiFly", 1500, true);
// OnGameModeExit
KillTimer(acT);
// function
forward public AntiFly();
public AntiFly()
{
for(new i, l = GetPlayerPoolSize(); i <= l; i++)
{
if(IsPlayerConnected(i))
{
//Fly Hack
new Float:Pos_x, Float:Pos_y, Float:Pos_z, anim = GetPlayerAnimationIndex(i);
GetPlayerVelocity(i, Pos_x, Pos_y, Pos_z);
if(anim == 1008 && GetPlayerWeapon(i) != 46 && (Pos_x <= -0.900000 || Pos_y <= -0.900000 || Pos_z <= -0.900000))
{
BanEx(i, "Fly Hack"); // Ban the player with reason Fly Hack
return 1;
}
}
}
return 1;
}
