pawn Code:
if(!IsPlayerConnected(playerid) && player1 != INVALID_PLAYER_ID)
Really? IsPlayerConnected is enough, and there's no need to check anymore. Did someone even notice this "player1 != INVALID_PLAYER_ID)"? So even if player1 is a VALID ID, there will be an error.