Unreceable code
#1

Hello guys,i've scripted this little AC for Health/Armour hacks.

pawn Код:
public HealthArmourCheat()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
                new Float:health;
                GetPlayerHealth(i,health);
                if(health == 100.0)
                {
                SetPlayerHealth(i, 0.0);
                new string [128];
                new pName[MAX_PLAYER_NAME];
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "%s has been banned for health hacks. - %d health.", pName,health);
                SendClientMessageToAll(0xFF0000FF, string);
                BanLog(string);
                new str2[64];
                format(str2,sizeof str2,"%s", pName);
                Blacklist(str2);
                new str[100];
                format(str,sizeof str,"0,4AC (ID: 505) - %s banned for health hacks. %d health. ",pName,health);
                IRC_GroupSay(IRC_Group, EchoChan,str);
                new sss[128];
                format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Health Hacks - %d health.", health);
                SendClientMessage(i,COLOR_LIGHTBLUE, sss);
                SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums:");
                SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
                BanEx(i, "AntiCheat - HealthHacks");
                continue;
                new Float:armour;
                GetPlayerArmour(i,armour);
                if(armour == 100.0)
                {
                SetPlayerArmour(i, 0.0);
                GetPlayerName(i, pName, sizeof(pName));
                format(string, sizeof(string), "%s has been banned for armour hacks. - %d armour.", pName,armour);
                SendClientMessageToAll(0xFF0000FF, string);
                BanLog(string);
                format(str2,sizeof str2,"%s", pName);
                Blacklist(str2);
                format(str,sizeof str,"0,4 AC (ID: 505) - %s banned for armour hacks. %d armour. ",pName,armour);
                IRC_GroupSay(IRC_Group, EchoChan,str);
                format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Armour Hacks - %d armour.", armour);
                SendClientMessage(i,COLOR_LIGHTBLUE, sss);
                SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums: ");
                SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
                BanEx(i, "AntiCheat - ArmourHacks");
                }
              }
           }
    }
    return 1;
}
But i get this:

warning 225: unreachable code

At this lines:

pawn Код:
continue;
                new Float:armour;
Thanks for help.
Reply
#2

pawn Код:
public HealthArmourCheat()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
                new Float:health;
                GetPlayerHealth(i,health);
                if(health == 100.0)
                {
                    SetPlayerHealth(i, 0.0);
                    new string [128];
                    new pName[MAX_PLAYER_NAME];
                    GetPlayerName(i, pName, sizeof(pName));
                    format(string, sizeof(string), "%s has been banned for health hacks. - %d health.", pName,health);
                    SendClientMessageToAll(0xFF0000FF, string);
                    BanLog(string);
                    new str2[64];
                    format(str2,sizeof str2,"%s", pName);
                    Blacklist(str2);
                    new str[100];
                    format(str,sizeof str,"0,4AC (ID: 505) - %s banned for health hacks. %d health. ",pName,health);
                    IRC_GroupSay(IRC_Group, EchoChan,str);
                    new sss[128];
                    format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Health Hacks - %d health.", health);
                    SendClientMessage(i,COLOR_LIGHTBLUE, sss);
                    SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums:");
                    SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
                    BanEx(i, "AntiCheat - HealthHacks");
                    continue;
        }
                new Float:armour;
                GetPlayerArmour(i,armour);
                if(armour == 100.0)
                {
                    SetPlayerArmour(i, 0.0);
                    GetPlayerName(i, pName, sizeof(pName));
                    format(string, sizeof(string), "%s has been banned for armour hacks. - %d armour.", pName,armour);
                    SendClientMessageToAll(0xFF0000FF, string);
                    BanLog(string);
                    format(str2,sizeof str2,"%s", pName);
                    Blacklist(str2);
                    format(str,sizeof str,"0,4 AC (ID: 505) - %s banned for armour hacks. %d armour. ",pName,armour);
                    IRC_GroupSay(IRC_Group, EchoChan,str);
                    format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Armour Hacks - %d armour.", armour);
                    SendClientMessage(i,COLOR_LIGHTBLUE, sss);
                    SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums: ");
                    SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
                    BanEx(i, "AntiCheat - ArmourHacks");
                }
    }
    }
    return 1;
}
Reppy reppy
Reply
#3

Thanks (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)