Пример #1
0
 public override void Use(Player p, string message, CommandData data)
 {
     if (p.Extras.GetBoolean("IS_CROUCHING"))
     {
         p.Extras["IS_CROUCHING"] = false;
         p.Extras["HAS_CROUCHED"] = true;
         p.SendMapMotd();
         Command.Find("SilentModel").Use(p, "humanoid|1");
     }
     else
     {
         p.Extras["IS_CROUCHING"] = true;
         p.Extras["HAS_CROUCHED"] = true;
         p.SendMapMotd();
         Command.Find("SilentModel").Use(p, "crouch");
     }
 }
Пример #2
0
 void HandleOnSentMap(Player p, Level prevLevel, Level level)
 {
     if (!p.Extras.GetBoolean(ext_allowed_key))
     {
         return;
     }
     // disable /maphack when you reload or change maps
     p.Extras[ext_allowed_key] = false;
     p.SendMapMotd();
     p.Message("%HHacks bypassing reset, use %T/MapHack %Hto turn on again");
 }
Пример #3
0
        public override void Use(Player p, string message, CommandData data)
        {
            if (!hooked)               // not thread-safe but meh
            {
                OnSentMapEvent.Register(HandleOnSentMap, Priority.High);
                OnGettingMotdEvent.Register(HandleGettingMotd, Priority.High);
                hooked = true;
            }

            if (LevelInfo.IsRealmOwner(p.name, p.level.MapName) || CheckExtraPerm(p, data, 1))
            {
                p.Extras[ext_allowed_key] = true;
                p.SendMapMotd();
                p.Message("&aYou are now bypassing hacks restrictions on this map");
            }
            else
            {
                p.Message("&cYou can only bypass hacks on your own realms.");
            }
        }
Пример #4
0
 void DisableHacksBypass(Player p)
 {
     p.Extras[ext_allowed_key] = false;
     p.SendMapMotd();
     p.Message("%HHacks bypassing reset, use %T/MapHack %Hto turn on again");
 }
Пример #5
0
 void EnableHacksBypass(Player p)
 {
     p.Extras[ext_allowed_key] = true;
     p.SendMapMotd();
     p.Message("&aYou are now bypassing hacks restrictions on this map");
 }