23.11.2009, 00:34
You used 'else if' instead of 'if'
pawn Код:
forward AntiCheat();
public AntiCheat()
{
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && ADMIN[i] == 0)
{
GetPlayerWeaponData(i, 7, weap, ammo); //Missle Launcher
if(ammo > 1 && weap == 36 && MISSLE36[i] == false) //Line With Error
{
new string [128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "BANNED: %s has been auto banned by console. [Missle Launcher]", pName);
SendClientMessageToAll(COLOR_RED, string);
printf(string);
GetPlayerName(i, pName, sizeof(pName));
BanEx(i, "%s has been auto banned by console. [Missle Launcher]");
}
}
}
return 1;
}