Beispiel #1
0
 public static void setshowholstereditems(ConsoleSystem.Arg arg)
 {
     ConVar.Server.showHolsteredItems = arg.GetBool(0, ConVar.Server.showHolsteredItems);
     foreach (BasePlayer basePlayer in BasePlayer.activePlayerList)
     {
         basePlayer.inventory.UpdatedVisibleHolsteredItems();
     }
     foreach (BasePlayer basePlayer1 in BasePlayer.sleepingPlayerList)
     {
         basePlayer1.inventory.UpdatedVisibleHolsteredItems();
     }
 }
Beispiel #2
0
        private void ConsoleCommand_Toggle(ConsoleSystem.Arg arg)
        {
            var player = arg.Player();

            if (!arg.HasArgs())
            {
                player.ConsoleMessage(GetEnabled(player).ToString());
                return;
            }

            bool enabled = arg.GetBool(0);

            SetEnabled(player, enabled);
            CreateUiIfFurnaceOpen(player);
        }
Beispiel #3
0
        void ConsoleCommandConfigSet(ConsoleSystem.Arg arg)
        {
            if (IsUInt(arg.GetString(2)))
            {
                Config[arg.GetString(0), arg.GetString(1)] = arg.GetUInt(2);
            }
            else if (arg.GetString(2) == "true" ||
                     arg.GetString(2) == "false")
            {
                Config[arg.GetString(0), arg.GetString(1)] = arg.GetBool(2);
            }
            else
            {
                Config[arg.GetString(0), arg.GetString(1)] = arg.GetString(2);
            }

            SaveConfig();

            ConfigLoader();
        }
Beispiel #4
0
        private void ConsoleCommand_Toggle(ConsoleSystem.Arg arg)
        {
            var player = arg.Player();

            if (!HasPermission(player))
            {
                player.ConsoleMessage(lang.GetMessage("nopermission", this, player.UserIDString));
                return;
            }

            if (!arg.HasArgs())
            {
                player.ConsoleMessage(GetEnabled(player).ToString());
                return;
            }

            bool enabled = arg.GetBool(0);

            SetEnabled(player, enabled);
            CreateUiIfFurnaceOpen(player);
        }
Beispiel #5
0
 public void Call(ConsoleSystem.Arg arg)
 {
     this.IsDown = arg.GetBool(0, false);
     this.frame  = Time.get_frameCount();
 }