private void OnPlayerTick(BasePlayer player) { if (!UseParachutes) { return; } if (UseParachutes) { if (!AddParachute.ContainsKey(player.userID)) { return; } if (AddParachute.ContainsKey(player.userID)) { if (Chute != null) { AddParachute.Remove(player.userID); timer.Once(0.5f, () => Chute.Call("ExternalAddPlayerChute", player)); if (Vanish != null && UseAutoVanish) { timer.Once(0.5f, () => Vanish.Call("Reappear", player)); } } if (Chute == null) { AddParachute.Remove(player.userID); } } } }
private bool IsInvisable(BasePlayer player) { if (Vanish == null) { return(false); } return(Vanish.Call <bool>("IsInvisible", player)); }
private void cmdConsoleFlyHeli(ConsoleSystem.Arg arg) { BasePlayer player = arg.Player(); string SteamID = player.userID.ToString(); if (isAllowed(player, "heliride.allowed")) { var playerheli = player.GetComponent <FlyHelicopter>(); if (HeliFlying.ContainsKey(player.userID)) { GameObject.Destroy(playerheli); HeliFlying.Remove(player.userID); if (Vanish != null && UseAutoVanish) { Vanish.Call("Reappear", player); } return; } if (playerheli != null) { GameObject.Destroy(playerheli); if (Vanish != null && UseAutoVanish) { Vanish.Call("Reappear", player); } HeliFlying.Remove(player.userID); return; } if (playerheli == null) { if (!player.IsFlying) { SendReply(player, lang.GetMessage("notflying", this, SteamID)); return; } if (Vanish != null && UseAutoVanish) { Vanish.Call("Disappear", player); } timer.Once(1f, () => AddHeli(player)); return; } } if (!isAllowed(player, "heliride.allowed")) { SendReply(player, lang.GetMessage("notallowed", this, SteamID)); } }
private void ToggleVanish(BasePlayer player) { if (Vanish == null) { return; } if (!IsInvisable(player)) { Vanish.Call("Disappear", player); } else { Vanish.Call("Reappear", player); } AdminGui(player); }
private bool IsInvisible(BasePlayer player) { return(Vanish != null && Vanish.Call <bool>("IsInvisible", player)); }