MpIsPlayerValid(player);
Whether the given identifier identifies an existing player or not. You can find out this way, whether that certain player did disconnect.