Esempio n. 1
0
 public static void teleport(ConsoleSystem.Arg args)
 {
     if (args.HasArgs(2))
     {
         BasePlayer player = args.GetPlayer(0);
         if (!Object.op_Implicit((Object)player) || !player.IsAlive())
         {
             return;
         }
         BasePlayer playerOrSleeper = args.GetPlayerOrSleeper(1);
         if (!Object.op_Implicit((Object)playerOrSleeper) || !playerOrSleeper.IsAlive())
         {
             return;
         }
         player.Teleport(playerOrSleeper);
     }
     else
     {
         BasePlayer basePlayer = args.Player();
         if (!Object.op_Implicit((Object)basePlayer) || !basePlayer.IsAlive())
         {
             return;
         }
         BasePlayer playerOrSleeper = args.GetPlayerOrSleeper(0);
         if (!Object.op_Implicit((Object)playerOrSleeper) || !playerOrSleeper.IsAlive())
         {
             return;
         }
         basePlayer.Teleport(playerOrSleeper);
     }
 }
Esempio n. 2
0
        public static void teleport(ConsoleSystem.Arg args)
        {
            if (!args.HasArgs(2))
            {
                BasePlayer basePlayer = args.Player();
                if (!basePlayer)
                {
                    return;
                }
                if (!basePlayer.IsAlive())
                {
                    return;
                }
                BasePlayer playerOrSleeper = args.GetPlayerOrSleeper(0);
                if (!playerOrSleeper)
                {
                    return;
                }
                if (!playerOrSleeper.IsAlive())
                {
                    return;
                }
                basePlayer.Teleport(playerOrSleeper);
                return;
            }
            BasePlayer player = args.GetPlayer(0);

            if (!player)
            {
                return;
            }
            if (!player.IsAlive())
            {
                return;
            }
            BasePlayer playerOrSleeper1 = args.GetPlayerOrSleeper(1);

            if (!playerOrSleeper1)
            {
                return;
            }
            if (!playerOrSleeper1.IsAlive())
            {
                return;
            }
            player.Teleport(playerOrSleeper1);
        }
Esempio n. 3
0
        public static string printrot(ConsoleSystem.Arg arg)
        {
            BasePlayer playerOrSleeper = arg.Player();

            if (arg.HasArgs(1))
            {
                playerOrSleeper = arg.GetPlayerOrSleeper(0);
            }
            if (playerOrSleeper == null)
            {
                return("invalid player");
            }
            return(playerOrSleeper.transform.rotation.eulerAngles.ToString());
        }
Esempio n. 4
0
        public static string combatlog(ConsoleSystem.Arg arg)
        {
            BasePlayer playerOrSleeper = arg.Player();

            if (arg.HasArgs(1) && playerOrSleeper != null && playerOrSleeper.IsAdmin)
            {
                playerOrSleeper = arg.GetPlayerOrSleeper(0);
            }
            if (playerOrSleeper == null)
            {
                return("invalid player");
            }
            return(playerOrSleeper.stats.combat.Get(ConVar.Server.combatlogsize));
        }
Esempio n. 5
0
        public static string printpos(ConsoleSystem.Arg arg)
        {
            BasePlayer basePlayer = arg.Player();

            if (arg.HasArgs(1))
            {
                basePlayer = arg.GetPlayerOrSleeper(0);
            }
            if (!Object.op_Equality((Object)basePlayer, (Object)null))
            {
                return(((Component)basePlayer).get_transform().get_position().ToString());
            }
            return("invalid player");
        }
Esempio n. 6
0
        public static string combatlog(ConsoleSystem.Arg arg)
        {
            BasePlayer basePlayer = arg.Player();

            if (arg.HasArgs(1) && Object.op_Inequality((Object)basePlayer, (Object)null) && basePlayer.IsAdmin)
            {
                basePlayer = arg.GetPlayerOrSleeper(0);
            }
            if (Object.op_Equality((Object)basePlayer, (Object)null))
            {
                return("invalid player");
            }
            return(basePlayer.stats.combat.Get(ConVar.Server.combatlogsize));
        }
Esempio n. 7
0
        public static string printeyes(ConsoleSystem.Arg arg)
        {
            BasePlayer basePlayer = arg.Player();

            if (arg.HasArgs(1))
            {
                basePlayer = arg.GetPlayerOrSleeper(0);
            }
            if (Object.op_Equality((Object)basePlayer, (Object)null))
            {
                return("invalid player");
            }
            Quaternion rotation = basePlayer.eyes.rotation;

            return(((Quaternion) ref rotation).get_eulerAngles().ToString());
        }
        [ConsoleCommand("barricade.buy")] //Used as the command to buy a barricade in conjunction with a plugin like GUI Shop. Is run through the server and can not be used in game.
        void cmdBarricadeBuy(ConsoleSystem.Arg arg)
        {
            if (arg.Player())
            {
                return;
            }
            if (!arg.HasArgs(1))
            {
                Puts(lang.GetMessage("args", this)); return;
            }
            var targetPlayer = arg.GetPlayerOrSleeper(1);

            if (!targetPlayer)
            {
                return;
            }
            createBarricade(targetPlayer);
            Puts(lang.GetMessage("buy", this, targetPlayer.displayName));
            return;
        }