Anti-Cheat 'Health' Not Working
#1

hello guys. i made my own anti cheat 'health' the problem is its not detecting or kicking me.
Code:
pawn Код:
public HackCheck()
{
    new
        Float:pHealth,
        Float:pArmour,
        Float:vHealth,
        string[128];
    for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
    {
        if(IsPlayerConnected(playerid))
        {
    GetPlayerHealth(playerid, pHealth);
    GetPlayerArmour(playerid, pArmour);
    /*if(AdminLevel[playerid] >= 1) //Do not kick a admin
    {
        return 1;
    }*/

    if(pHealth >= 100.1)
    {
        SendClientMessage(playerid, COLOR_RED,"You Have Been Auto Kick For Using Health Hack");
        format(string, sizeof(string), "%s(%d) Has been Auto-Kicked for using Health Hack", GetName(playerid), playerid);
        SendClientMessageToAll(COLOR_RED, string);
        Kick(playerid);
    }
    if(pArmour >= 100.1)
    {
        SendClientMessage(playerid, COLOR_RED,"You Have Been Auto Kick For Using Armour Hack");
        format(string, sizeof(string), "%s(%d) Has been Auto-Kicked for using Armour Hack", GetName(playerid), playerid);
        SendClientMessageToAll(COLOR_RED, string);
        Kick(playerid);
    }
    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
        if(vHealth >= 1000.1)
        {
            SendClientMessage(playerid, COLOR_RED,"You Have Been Auto Kick For Using Vehicle Health Hack");
            format(string, sizeof(string), "%s(%d) Has been Auto-Kicked for using Vehicle Health Hack", GetName(playerid), playerid);
            SendClientMessageToAll(COLOR_RED, string);
            SetVehicleToRespawn(GetPlayerVehicleID(playerid));
            Kick(playerid);
            }
            }
            }
    return 1;
    }
return 1;
}
i made a new callback public HackCheck() and i got a timer
Код:
SetTimer("HackCheck",3000,1);
but the anti-hack doesn't work. i dont know if i my coding is right. or? can anyone help me please?
Reply
#2

Try ">= 101"
And some "return 0;" statements would be nice after every kick.
edit use some "printf" to see what's going on
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Pretty sure that's the problem - what was wrong with the multitude of existing systems?
Lol, what I was thinking ;d
Reply
#4

Are you actually setting the health, armor, or vehicle health to above their limit? Just using a hack won't do it, because it sets it to 100 and not 100.1 or above. This is a very weak anticheat and considering the fact that most cheaters in SAMP use the same tool, this is not effective at all and it won't ban anybody.
Reply
#5

"by cessil's Anticheat tips"

Try setting their health to 99. Then if there health is 100.0 above then there is 99.9% that they are hacking.
However, if the admin uses the god mode. Admin will detect as hacker. But otherwise you've to find a way to make the Admin undetectable as Hacker.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)