01.02.2012, 22:15
Got this warning
warning 225: unreachable code
Complete code:
Warning is here:
Thanks.
warning 225: unreachable code
Complete code:
pawn Code:
public AntiCheat()
{
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerWeaponData(i, 7, weap, ammo);
if((ammo >= 1) && weap == 35 || weap == 36 || weap == 38 || weap == 43 || weap == 44 || weap == 45)
{
new string[150];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s (%d) has been killed by AntiCheat. %s with %d ammo.",pName,i,weap,ammo);
SendClientMessageToAll(red, string);
AcLog(string);
new sss[128];
format(sss, sizeof(sss), "You have been killed by AntiCheat for having a %s with %d ammo.",weap,ammo);
SendClientMessage(i,yellow, sss);
SendClientMessage(i,yellow, "If you think this is a mistake,appeal at: Forum.");
SendClientMessage(i,yellow, "Don't try to evade your ban.Doing it will increase the probability to get range banned.");
format(string, sizeof(string), "AntiCheat - %s %d",weap,ammo);
BanEx(i,string);
BanEx(i, "AntiCheat - Weapon Cheat");
continue;
new Float:health,Float:armour;
GetPlayerHealth(i,health);
GetPlayerArmour(i,armour);
if(health == 100.0 || armour == 100.0)
{
new bmsg[150],reason1[32],reason2[32];
if(health == 100.0) { reason1 = "Health"; }
else if(armour == 100.0) { reason2 = "Armour";}
format(bmsg, sizeof(bmsg), "%s (%d) has been killed by AntiCheat. %s - %s.",pName,i,reason1,reason2);
SendClientMessageToAll(red, bmsg);
AcLog(bmsg);
new ss[128];
format(ss, sizeof(ss), "You have been killed by AntiCheat. %s - %s.", reason1,reason2);
SendClientMessage(i,red, ss);
SendClientMessage(i,red, "If you think this is a mistake,appeal at: Forum.");
SendClientMessage(i,red, "Don't try to evade your ban.Doing it will increase the probability to get range banned.");
new banx[150];
format(banx, sizeof(banx), "AntiCheat - %s %s",reason1,reason2);
BanEx(i,banx);
}
}
}
return 1;
}
pawn Code:
continue;