void TeleportPlayerHome(BasePlayer player) { EventPlayer eventplayer = player.GetComponent <EventPlayer>(); if (eventplayer == null) { return; } if (player.IsDead()) { return; } if (eventplayer.savedHome) { eventplayer.TeleportHome(); } }