SA-MP Forums Archive
Hello need help with 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: Hello need help with anti cheat (/showthread.php?tid=535923)



Hello need help with anti cheat - MBilal - 06.09.2014

PHP код:
new Float:animX, Float:animY, Float:animZ;
new 
aNim = GetPlayerAnimationIndex(playerid);
GetPlayerPos(playerid, animX, animY, animZ);
if(!
IsPlayerInWater(playerid))
{    if((
aNim >= 1538) && (aNim <= 1542) && animZ > 5)
    {
    
Player[playerid][pBan]=1;
    
SendClientMessage(playerid, COLOR_YELLOW, "You have been banned from the server. Reason: Sobiet Fly Hack");
    
format(pstring, 128, "Hitler : %s has been banned from the server. Reason: Sobiet Fly Hack", GetName(playerid));
    
SendClientMessageToAll(COLOR_KRED, pstring);
    
SaveIn("BanLog.txt",pstring);
    
SetTimerEx("KickPlayer",1000/2,false,"d", playerid);
}
    return 
1;
}
stock IsPlayerInWater(playerid) {
        new 
anim = GetPlayerAnimationIndex(playerid);
        if (((
anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
        return 
0;
} 
HELP ME ITS NOT WORKING


Re: Hello need help with anti cheat - Malicious - 06.09.2014

what happens when you compile?


Re: Hello need help with anti cheat - MBilal - 06.09.2014

no error but it not detect cheat


Re: Hello need help with anti cheat - Malicious - 06.09.2014

Have you tried to use GetPlayerVelocity? if I'm not mistaken, you can't really define a certain aspect of water :/


Re: Hello need help with anti cheat - MBilal - 06.09.2014

Can u explain that dude!!


Re: Hello need help with anti cheat - Malicious - 06.09.2014

https://sampwiki.blast.hk/wiki/GetPlayerVelocity <---- if I'm not mistaken, people that use ****** go faster than a normal player, so this could catch them out easily