Ejemplo n.º 1
0
        public void OnPlayerConnected(Fougerite.Player pl)
        {
            var id = pl.SteamID;

            if (Frozen.Contains(id))
            {
                pl.SendCommand("input.bind Left None None");
                pl.SendCommand("input.bind Right None None");
                pl.SendCommand("input.bind Up None None");
                pl.SendCommand("input.bind Down None None");
                pl.MessageFrom("Freezer", blue + "Omg you cant bypas the freezer.");
            }
        }
Ejemplo n.º 2
0
 public void OnPlayerMove(HumanController hc, Vector3 origin, int encoded, ushort stateflags, uLink.NetworkMessageInfo info, Util.PlayerActions action)
 {
     Fougerite.Player pl = Fougerite.Server.Cache.ContainsKey(hc.netUser.userID) ? Fougerite.Server.Cache[hc.netUser.userID] : Fougerite.Server.GetServer().FindPlayer(hc.netUser.userID.ToString());
     {
         var id = pl.SteamID;
         if (Frozen.Contains(id))
         {
             pl.SendCommand("input.bind Left None None");
             pl.SendCommand("input.bind Right None None");
             pl.SendCommand("input.bind Up None None");
             pl.SendCommand("input.bind Down None None");
         }
     }
 }
Ejemplo n.º 3
0
 static void FreezePlayer(Fougerite.Player player)
 {
     player.SendCommand("input.bind Up 7 None");
     player.SendCommand("input.bind Down 7 None");
     player.SendCommand("input.bind Left 7 None");
     player.SendCommand("input.bind Right 7 None");
     player.SendCommand("input.bind Sprint 7 None");
     player.SendCommand("input.bind Duck 7 None");
     player.SendCommand("input.bind Jump 7 None");
     player.SendCommand("input.bind Fire 7 None");
     player.SendCommand("input.bind AtlFire 7 None");
 }
Ejemplo n.º 4
0
 public void OnCommand(Fougerite.Player player, string cmd, string[] args)
 {
     if (cmd == "fps")
     {
         player.SendCommand("grass.on false");
         player.SendCommand("grass.forceredraw False");
         player.SendCommand("grass.displacement True");
         player.SendCommand("grass.disp_trail_seconds 0");
         player.SendCommand("grass.shadowcast False");
         player.SendCommand("grass.shadowreceive False");
         player.SendCommand("render.level 0");
         player.SendCommand("render.vsync False");
         player.SendCommand("footsteps.quality 2");
         player.SendCommand("gfx.grain False");
         player.SendCommand("gfx.ssao False");
         player.SendCommand("gfx.shafts false");
         player.SendCommand("gfx.damage false");
         player.SendCommand("gfx.ssaa False");
         player.SendCommand("gfx.bloom False");
         player.SendCommand("gfx.tonemap False");
         player.MessageFrom(Name, "[color #c8102e]You Switched to FPS Mode!");
     }
     else if (cmd == "graph")
     {
         player.SendCommand("grass.on true");
         player.SendCommand("grass.forceredraw true");
         player.SendCommand("grass.displacement false");
         player.SendCommand("grass.disp_trail_seconds 10");
         player.SendCommand("grass.shadowcast true");
         player.SendCommand("grass.shadowreceive true");
         player.SendCommand("render.level 1");
         player.SendCommand("render.vsync true");
         player.SendCommand("footsteps.quality 2");
         player.SendCommand("gfx.grain true");
         player.SendCommand("gfx.ssao true");
         player.SendCommand("gfx.shafts true");
         player.SendCommand("gfx.damage true");
         player.SendCommand("gfx.tonemap true");
         player.SendCommand("gfx.ssaa true");
         player.SendCommand("gfx.bloom true");
         player.MessageFrom(Name, "[color #88b04b]You Switched to Graph Mode!");
     }
 }
Ejemplo n.º 5
0
 static void UnFreezePlayer(Fougerite.Player player)
 {
     player.SendCommand("config.load");
     player.SendCommand("config.load");
     player.SendCommand("config.load");
 }
Ejemplo n.º 6
0
 public void OnCommand(Fougerite.Player player, string cmd, string[] args)
 {
     if (cmd == "freeze")
     {
         if (!player.Admin)
         {
             player.Notice("✘", "You are not allowed to freeze someone");
         }
         else
         {
             string           s = string.Join(" ", args);
             Fougerite.Player p = Fougerite.Server.GetServer().FindPlayer(s);
             if (p == null)
             {
                 player.MessageFrom("Freezer", green + "Failed to find " + s);
             }
             else if (args.Length.Equals(0))
             {
                 player.MessageFrom("Freezer", green + "Wrong Syntax use /freeze <name>");
             }
             else
             {
                 Fougerite.Player pl = Fougerite.Server.GetServer().FindPlayer(string.Join(" ", args)) ?? null;
                 if (!pl.Equals(null))
                 {
                     var id = pl.SteamID;
                     player.Notice("☢", pl.Name + " Was frozen");
                     pl.SendCommand("input.bind Left None None");
                     pl.SendCommand("input.bind Right None None");
                     pl.SendCommand("input.bind Up None None");
                     pl.SendCommand("input.bind Down None None");
                     pl.MessageFrom("Freezer", blue + "You has been frozen");
                     Frozen.Add(id);
                     if (Announces)
                     {
                         Fougerite.Server.GetServer().Broadcast(pl.Name + blue + " Has been frozen by " + green + player.Name);
                     }
                 }
             }
         }
     }
     else if (cmd == "unfreeze")
     {
         if (!player.Admin)
         {
             player.Notice("✘", "You are not allowed to unfreeze someone");
         }
         else
         {
             string           s = string.Join(" ", args);
             Fougerite.Player p = Fougerite.Server.GetServer().FindPlayer(s);
             if (p == null)
             {
                 player.MessageFrom("Freezer", green + "Failed to find " + s);
             }
             else if (args.Length.Equals(0))
             {
                 player.MessageFrom("Freezer", green + "Wrong Syntax use /unfreeze <name>");
             }
             else
             {
                 Fougerite.Player pl = Fougerite.Server.GetServer().FindPlayer(string.Join(" ", args)) ?? null;
                 if (!pl.Equals(null))
                 {
                     var id = pl.SteamID;
                     player.Notice("☢", pl.Name + " Was unfrozen");
                     pl.SendCommand("input.bind Left A None");
                     pl.SendCommand("input.bind Right D None");
                     pl.SendCommand("input.bind Up W None");
                     pl.SendCommand("input.bind Down S None");
                     pl.MessageFrom("Freezer", blue + "You has been unfrozen");
                     pl.InventoryNotice("You have been paralyzed");
                     Frozen.Remove(id);
                     if (Announces)
                     {
                         Fougerite.Server.GetServer().Broadcast(pl.Name + blue + " Has been unfrozen by " + green + player.Name);
                     }
                 }
             }
         }
     }
 }