[Tutorial] Make an Anti Fly Hack (Of the new cheat)
#1

Make an Anti Fly Hack (Of the new cheat)


їWhat you will learn?
In this tutorial you will learn how to make an Anti Fly Hack system for the new cheats (The one that use the parachute animation).
Tutorial:
pawn Code:
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 :)
}
Credits:
Code: [UTL]Miller
Player velocity: Anti airbreak
If you find any bug please report it.
Cya!
Reply
#2

Not only the falling parachute animation is used, the swimming animation is also used. Check velocity for swimming animations, and if used above set velocity, ban.
Reply
#3

lol?
Reply
#4

Quote:
Originally Posted by Sublime
View Post
Not only the falling parachute animation is used, the swimming animation is also used. Check velocity for swimming animations, and if used above set velocity, ban.
In the new cheats they use parachute animation. If you want to do an anti cheat of the old fly hack (with swimming animation) you can make the one you say or use this:

pawn Code:
new Float:animX, Float:animY, Float:animZ;
new anim = GetPlayerAnimationIndex(playerid);
GetPlayerPos(playerid, animX, animY, animZ);
if((anim >= 1538) && (anim <= 1542) && animZ > 5)
{
    BanEx(playerid, "Fly hack");
    return 1;
}
Thanks for your comment!

Quote:
Originally Posted by xF4Life
View Post
lol?
Thanks?
Reply
#5

ur the best. Working perfectly. +rep
Reply
#6

Is this a tutorial ?? :O
Reply
#7

Where to put code?
Reply
#8

Quote:
Originally Posted by Lajko1
View Post
Where to put code?
OnGameModeInIt, or I think OnPlayerConnect.
Reply
#9

Or on player Update
Reply
#10

I'm not sure if this line here is doing as you intended

pawn Code:
if(Pos_x <= -0.800000  || Pos_y <= -0.800000 || Pos_z <= -0.800000 && anim == 1008)
I think it should read

pawn Code:
if((Pos_x <= -0.800000  || Pos_y <= -0.800000 || Pos_z <= -0.800000) && anim == 1008)
Try running the following code on this website.

http://slice-vps.nl:7070/

pawn Code:
#include <a_samp>

main() {

    new a = 1, b = 2, c = 3;
   
    if(a == 1 || b < 3 && c == 4) print("Check 1");
    if((a == 1 || b < 3) && c == 4) print("Check 2!");

    return 1;
}
Output: Check 1

So basically what I'm saying is if one of these checks were true
pawn Code:
Pos_x <= -0.800000  || Pos_y <= -0.800000
The animation check doesn't mean anything.
Reply
#11

Is this accurate?
Reply
#12

Quote:
Originally Posted by Wittzi
View Post
Is this accurate?
nope
Reply
#13

This is pure shit. Without knowing the fact how it works u put the shit here.
Reply
#14

Quote:
Originally Posted by Humza
View Post
This is pure shit. Without knowing the fact how it works u put the shit here.
Wow great you just bumped 3 year old thread .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)