Example #1
0
 public void Use(Player p, string[] args)
 {
     Level tempLevel = Level.FindLevel(args[0]);
     if (tempLevel != null)
     {
         if (tempLevel.visit != null && tempLevel.visit.Permission < p.Group.Permission) {
             p.SendMessage("You dont have permission to go to this level");
             return;
         }
         #region Send and Spawn
         p.GlobalDie();
         p.IsLoading = true;
         p.Level = tempLevel;
         short x = (short)((0.5 + tempLevel.SpawnPos.x) * 32);
         short y = (short)((1 + tempLevel.SpawnPos.y) * 32);
         short z = (short)((0.5 + tempLevel.SpawnPos.z) * 32);
         p.Pos = new Vector3S(x, z, y);
         p.Rot = tempLevel.SpawnRot;
         p.oldPos = p.Pos;
         p.oldRot = p.Rot;
         p.SendSpawn(p);
         p.IsLoading = false;
         p.SpawnOtherPlayersForThisPlayer();
         p.SpawnThisPlayerToOtherPlayers();
         p.SpawnBotsForThisPlayer();
         #endregion
         Player.UniversalChat(p.Username + " went to " + args[0] + "!");
     }
     else
     {
         p.SendMessage("This level does not exist!");
     }
 }
Example #2
0
 public void Use(Player p, string[] args)
 {
     ExtraPlayerData z = ZombiePlugin.ZombiePlugin.FindPlayer(p);
     z.Aka = !z.Aka;
     foreach (Player e in Server.Players.ToArray())
     {
         Packet pa = new Packet(new byte[2] { (byte)Packet.Types.SendDie, e.ID });
         if (p != e)
         {
             p.SendPacket(pa);
         }
     }
     p.SpawnOtherPlayersForThisPlayer();
     p.SendMessage("Aka mode is now " + z.Aka.ToString().Replace("True", "on!").Replace("False", "off!"));
 }