[HELP] Anti armour hack problem
#1

Hi

I have a problem with my anti armour hack:

pawn Код:
public PancirProvera()
{
    new string[128];
    new Float:armour;
    new citer[MAX_PLAYER_NAME];
    for(new i; i < MAX_PLAYERS; i++)
    {
        GetPlayerArmour(i, armour);
        GetPlayerName(i, citer, sizeof(citer));
        if(armour > 0 && !IsACop(i) && PlayerInfo[i][pAdmin] == 0)
        {
            new adminionline = 0;
            if(PlayerInfo[i][pAdmin] > 0) adminionline++;
            if(adminionline == 0)
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s | Armor: %0.f | IZBACEN!!!", citer, i, armour);
                SendClientMessageToAll(COLOR_RED, string);
                format(string, sizeof(string), "|DLG|: %s izbaceni ste sa servera zbog moguceg armor hacka.", citer);
                SendClientMessage(i, COLOR_YELLOW, string);
                SendClientMessage(i, COLOR_YELLOW, "|DLG|: Ukoliko mislite da je ovo greska, zanemarite ovo obavestenje.");
                Kick(i);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | KICK", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
            else
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s[ID: %d] | Armor: %0.f | Moze imati max: 0", citer, i, armour);
                ABroadCast(COLOR_RED, string, 1);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | UPOZORENJE ADMINIMA", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
        }
        else if(armour > 250 && IsACop(i) && PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pAdmin] < 1338)
        {
            new adminionline = 0;
            if(PlayerInfo[i][pAdmin] > 0) adminionline++;
            if(adminionline == 0)
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s | Armor: %0.f | IZBACEN!!!", citer, i, armour);
                SendClientMessageToAll(COLOR_RED, string);
                format(string, sizeof(string), "|DLG|: %s izbaceni ste sa servera zbog moguceg armor hacka.", citer);
                SendClientMessage(i, COLOR_YELLOW, string);
                SendClientMessage(i, COLOR_YELLOW, "|DLG|: Ukoliko mislite da je ovo greska, zanemarite ovo obavestenje.");
                Kick(i);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | KICK", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
            else
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s[ID: %d] | Armor: %0.f | Moze imati max: 100", citer, i, armour);
                ABroadCast(COLOR_RED, string, 1);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | UPOZORENJE ADMINIMA", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
        }
        else if(armour > 250 && PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pAdmin] < 1338)
        {
            new adminionline = 0;
            if(PlayerInfo[i][pAdmin] > 0) adminionline++;
            if(adminionline == 0)
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s | Armor: %0.f | IZBACEN!!!", citer, i, armour);
                SendClientMessageToAll(COLOR_RED, string);
                format(string, sizeof(string), "|DLG|: %s izbaceni ste sa servera zbog moguceg armor hacka.", citer);
                SendClientMessage(i, COLOR_YELLOW, string);
                SendClientMessage(i, COLOR_YELLOW, "|DLG|: Ukoliko mislite da je ovo greska, zanemarite ovo obavestenje.");
                Kick(i);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | KICK", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
            else
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s[ID: %d] | Armor: %0.f | Moze imati max: 250", citer, i, armour);
                ABroadCast(COLOR_RED, string, 1);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | UPOZORENJE ADMINIMA", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
        }
        break;
    }
}

Actually, the problem is with this part of code:
pawn Код:
else if(armour > 250 && PlayerInfo[i][pAdmin] > 0 && PlayerInfo[i][pAdmin] < 1338)
        {
            new adminionline = 0;
            if(PlayerInfo[i][pAdmin] > 0) adminionline++;
            if(adminionline == 0)
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s | Armor: %0.f | IZBACEN!!!", citer, i, armour);
                SendClientMessageToAll(COLOR_RED, string);
                format(string, sizeof(string), "|DLG|: %s izbaceni ste sa servera zbog moguceg armor hacka.", citer);
                SendClientMessage(i, COLOR_YELLOW, string);
                SendClientMessage(i, COLOR_YELLOW, "|DLG|: Ukoliko mislite da je ovo greska, zanemarite ovo obavestenje.");
                Kick(i);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | KICK", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
            else
            {
                format(string, sizeof(string), "|DLG| Moguci armor hack || Igrac: %s[ID: %d] | Armor: %0.f | Moze imati max: 250", citer, i, armour);
                ABroadCast(COLOR_RED, string, 1);
                new d,m,y;
                new h,mi,s;
                getdate(d,m,y);
                gettime(h,mi,s);
                format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) Igrac: %s | Vrsta cheata: Armour Hack | UPOZORENJE ADMINIMA", d, m, y, h, mi, s, citer);
                CheatLog(string);
            }
It checks player's admin status and armor, and if armor is higher than 250 (because when admin turn on duty he will get 250 armor) anticheat will be display message that he is cheater. If I set armour on 251, 252, ...259 for me, it will be display message that I am cheater. BUT, if I set armor on 300, 400, 500, 1000, 174575784, 15795, 1263 9999, etc. (more than 259) anticheat does not work and don't display a message.
So, how to fix it? :/
Reply
#2

Refresh...
Reply
#3

does it appear in your log? I think your problem is the adminonline part. You should check that before your loop, or else not all warnings will show ingame, only get logged.
Reply
#4

I can't see it in logfile. Part adminionline check online administrators, and if some admins online it will be just send message to admins, but if no admins online it will be kick player and send message to all. But, the problem is that what my anticheat no detect armour hack if you have more than 255 armour and if you are admin ://
So, if I have 300 armour, and I'm admin, anticheat no detect armour hack and not log this.
But, if I have 251 armour, and I'm admin, anticheat will be detect armour hack and log it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)