16.11.2016, 09:39
So here is the code,the problem is that sometimes It bans players for sitting or laying (while using a anim) on a driving vehicle. Is there any way I can sort this out?
PHP код:
public OnPlayerUpdate(playerid)
{
//Fly Hack
new Float:Pos_x,Float:Pos_y,Float:Pos_z; // We create the variable that will save the velocity of the player
new anim = GetPlayerAnimationIndex(playerid); // We create the variable that will save the anim that player is using
GetPlayerVelocity(playerid,Pos_x,Pos_y,Pos_z); // We get the player velocity and we set it to the variable
if(Pos_x <= -0.800000 || Pos_y <= -0.800000 || Pos_z <= -0.800000 && anim == 1008) // If x,y,z is -0.800000 or bigger and the player is using parachute animation
{
BanEx(playerid, "Fly Hack"); // Ban the player with reason Fly Hack
return 1; // Return 1 :)
}