SA-MP Forums Archive
Help ! Anti cheat . - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help ! Anti cheat . (/showthread.php?tid=535494)



Help ! Anti cheat . - lizter008 - 04.09.2014

airbrake with animation

[ame]http://www.youtube.com/watch?v=TCl-ndRXGVM[/ame]


Re: Help ! Anti cheat . - lizter008 - 05.09.2014

Help me please .


Re: Help ! Anti cheat . - Kimossab - 05.09.2014

check if their animation is the skydiving one and check their coordinates, if they're not falling or going up then they're cheating.


Re: Help ! Anti cheat . - Flake. - 05.09.2014

Since that animation only works if you have a parachute just check if the player has weapon id 46 equip (parachute) if not they're obviously hacking.


Re: Help ! Anti cheat . - lizter008 - 07.09.2014

How ?


Re: Help ! Anti cheat . - Flake. - 08.09.2014

pawn Код:
foreach(Player, i) //Cycling through each player thats connected, you'll need to include the foreach include if you haven't already
{      
    if(GetPlayerAnimationIndex(i))//Getting the players current animation
    {  
        new animlib[32], animname[32]; //defining our two local vars that'll handle the animation name and library
        GetAnimationName(GetPlayerAnimationIndex(i), animlib, sizeof(animlib), animname, sizeof(animname));
        if(!strcmp(animlib, "PARACHUTE", true) && !strcmp(animname, "FALL_SkyDive_Accel", true))
        //To make it simple, we're just looking for the animation that handles falling with a parachute
    {
    if(GetPlayerWeapon(i) != 46) //If the player does not have the parachute as a weapon.
    {
        //Your kick/ban code here
    }
}
As an example


Re: Help ! Anti cheat . - Ihateyou - 08.09.2014

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
pawn Код:
foreach(Player, i) //Cycling through each player thats connected, you'll need to include the foreach include if you haven't already
{      
    if(GetPlayerAnimationIndex(i))//Getting the players current animation
    {  
        new animlib[32], animname[32]; //defining our two local vars that'll handle the animation name and library
        GetAnimationName(GetPlayerAnimationIndex(i), animlib, sizeof(animlib), animname, sizeof(animname));
        if(!strcmp(animlib, "PARACHUTE", true) && !strcmp(animname, "FALL_SkyDive_Accel", true))
        //To make it simple, we're just looking for the animation that handles falling with a parachute
    {
    if(GetPlayerWeapon(i) != 46) //If the player does not have the parachute as a weapon.
    {
        //Your kick/ban code here
    }
}
As an example
ur missing some brackets


Re: Help ! Anti cheat . - Flake. - 08.09.2014

Quote:
Originally Posted by Ihateyou
Посмотреть сообщение
ur missing some brackets
Oops, add 1 more closing bracket at the bottom of the function.