Пример #1
0
        public string[] OnCall(ICommandSender sender, string[] args)
        {
            if (args.Length > 0)
            {
                string id      = "";
                Player cPlayer = SerpentsHand.GetPlayer(args[0], out cPlayer);
                if (cPlayer != null)
                {
                    id = cPlayer.SteamId;
                }
                else if (ulong.TryParse(args[0], out ulong a))
                {
                    id = a.ToString();
                }
                else
                {
                    return(new string[] { "Error: invalid player id." });
                }

                Player tPlayer = SerpentsHand.FindPlayer(id);
                if (tPlayer != null)
                {
                    SerpentsHand.SpawnPlayer(tPlayer);
                    return(new string[] { "Spawned player \"" + tPlayer.Name + "\" as Serpent's Hand." });
                }
            }
            return(new string[] { GetUsage() });
        }
Пример #2
0
        public void OnPlayerDie(PlayerDeathEvent ev)
        {
            if (SerpentsHand.shPlayers.Contains(ev.Player.SteamId))
            {
                SerpentsHand.shPlayers.Remove(ev.Player.SteamId);
            }

            if (ev.Player.TeamRole.Role == Role.SCP_106 && !plugin.GetConfigBool("sh_friendly_fire"))
            {
                foreach (string str in SerpentsHand.shPlayersInPocket)
                {
                    SerpentsHand.FindPlayer(str).Kill();
                }
            }
        }