01.02.2014, 14:36
In your case, MAX_PLAYERS is 100 and INVALID_PLAYER_ID is 65535, so no. It will fail again. The code you had in the first post checks for the last part of it but you miss one:
is out of that check; thus it gives the run time error. Add it inside that check:
pawn Код:
if(APlayerData[killerid][PlayerLevel] < 1){
if(GetPlayerWeapon(killerid) == 38) BanEx(killerid, "Weapon Hack"); //Ban if they have a minigun
if(GetPlayerWeapon(killerid) == 35) BanEx(killerid, "Weapon Hack"); //Ban if they have a minigun
if(GetPlayerWeapon(killerid) == 36) BanEx(killerid, "Weapon Hack"); //Ban if they have a minigun
if(GetPlayerWeapon(killerid) == 37) BanEx(killerid, "Weapon Hack"); //Ban if they have a minigun
}
pawn Код:
if (killerid != INVALID_PLAYER_ID)
{
// here..
}