Anti Fly hack problem
#1

Using this
https://sampforum.blast.hk/showthread.php?tid=373687

Isn't working, after editing to to mine

PHP код:
public OnPlayerUpdate(playerid)
{
    
WantedLevelColor(playerid);
    if(
GetPlayerAnimationIndex(playerid))
    {
        new 
animlib[32];
      new 
animname[32];
      
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
      if(
strcmp(animlib"SWIM"true) == 0)
       {
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        if(
>= 8.45)
        {
          if(!
IsPlayerInRangeOfPoint(playerid,37.85,1964.0404,-1199.6774,17.4400))
          {
            
dives[playerid] = 1;
          }
        }
      }
      
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
      if(
strcmp(animname"FALL_FALL"true) == 0)
      {
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        
SetPVarFloat(playerid,"Float",Z);
        
SetTimer("Checkhim",1200,false);
      }
    }
    new 
index GetPlayerAnimationIndex(playerid);
    if(
index >= 958 && index <= 962)
    {
      if(
GetPlayerWeapon(playerid) != 46)
      {
        
dives[playerid] = 1;
      }
    }
    if(
dives[playerid] == 1)
    {
      
//SendClientMessage(playerid,0xC30000FF,"You are kicked Reason: Flyhack");
      //Kick(playerid);
      
for(new 0MAX_PLAYERSi++)
      {
        if(
IsPlayerAdmin(i))
        {
          new 
pname[MAX_PLAYER_NAME];
            new 
string[128];
          
GetPlayerName(ipnamesizeof(pname));
          
format(string,sizeof(string),"***[ANTI CHEAT] %s(%d) has been banned from the server.  (Reason: Fly Hack)",pname,i);
          
SendClientMessageToAll(COLOR_PINK,string);
             
PlayerInfo[i][pABanned] =1;
          
GameTextForPlayer(i"~r~BANNED",1000000,4);
            
Kick(i);
          
GetPlayerName(ipnamesizeof(pname));
              
format(string,sizeof(string),"***[ANTI CHEAT] %s(%d) has been banned from the server.  (Reason: Fly Hack)",pname,i);
          
IRC_GroupSay(groupID,IRC_CHANNEL,string);
          
IRC_GroupSay(groupID,ADMIN_CHANNEL,string);
          
GetPlayerName(i,pname,MAX_PLAYER_NAME);
          
format(string,sizeof(string),"***[ANTI CHEAT] An %s(%d) has Anti-banned %s(%d). (Reason: Fly Hack)",pname,i);
          
SendAdminMessage(COLOR_PINKstring);
          new 
Float:XFloat:YFloat:ZGetPlayerPos(playerid,X,Y,Z);
          
PlayerPlaySound(playerid,1057,X,Y,Z);
          
PlayerPlaySound(playerid,1057,X,Y,Z);
        }
      }
    }
     
//Other on player update stuff 
someone?
Reply
#2

PHP код:
public OnPlayerUpdate(playerid)
{
    
WantedLevelColor(playerid);
    if(
GetPlayerAnimationIndex(playerid))
    {
        new 
animlib[32];
      new 
animname[32];
      
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
      if(
strcmp(animlib"SWIM"true) == 0)
       {
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        if(
>= 8.45)
        {
          if(!
IsPlayerInRangeOfPoint(playerid,37.85,1964.0404,-1199.6774,17.4400))
          {
            
dives[playerid] = 1;
          }
        }
      }
      
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
      if(
strcmp(animname"FALL_FALL"true) == 0)
      {
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,X,Y,Z);
        
SetPVarFloat(playerid,"Float",Z);
        
SetTimer("Checkhim",1200,false);
      }
    }
    new 
index GetPlayerAnimationIndex(playerid);
    if(
index >= 958 && index <= 962)
    {
      if(
GetPlayerWeapon(playerid) != 46)
      {
        
dives[playerid] = 1;
      }
    }
    if(
dives[playerid] == 1)
    {
      
//SendClientMessage(playerid,0xC30000FF,"You are kicked Reason: Flyhack");
      //Kick(playerid);
      
for(new 0MAX_PLAYERSi++)
      {
        if(
IsPlayerAdmin(i))
        {
          new 
pname[MAX_PLAYER_NAME];
            new 
string[128];
          
GetPlayerName(ipnamesizeof(pname));
          
format(string,sizeof(string),"***[ANTI CHEAT] %s(%d) has been banned from the server.  (Reason: Fly Hack)",pname,i);
          
SendClientMessageToAll(COLOR_PINK,string);
             
PlayerInfo[i][pABanned] =1;
          
GameTextForPlayer(i"~r~BANNED",1000000,4);
            
Kick(i);
              
format(string,sizeof(string),"***[ANTI CHEAT] %s(%d) has been banned from the server.  (Reason: Fly Hack)",pname,i);
          
IRC_GroupSay(groupID,IRC_CHANNEL,string);
          
IRC_GroupSay(groupID,ADMIN_CHANNEL,string);
          
format(string,sizeof(string),"***[ANTI CHEAT] An %s(%d) has Anti-banned %s(%d). (Reason: Fly Hack)",pname,i);
          
SendAdminMessage(COLOR_PINKstring);
          new 
Float:XFloat:YFloat:ZGetPlayerPos(playerid,X,Y,Z);
          
PlayerPlaySound(playerid,1057,X,Y,Z);
          
PlayerPlaySound(playerid,1057,X,Y,Z);
        }
      }
    }
     
//Other on player update stuff 

try that
Reply
#3

Just letting you know, I doubt this will work... pretty sure the swimming animation for when your flying is clientside.
Reply
#4

Not working too @Gangster-rocks :/
Reply
#5

Try use getplayerspeed and when over around 300 mph ban them?
Reply
#6

GetPlayerSpeed? how to do it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)