Beispiel #1
0
 public void On079Elevator(Player079ElevatorEvent ev)
 {
     if (plugin.Active && ev.Elevator.ElevatorType != ElevatorType.SCP049Chamber && ev.Elevator.ElevatorType != ElevatorType.WarheadRoom)
     {
         ev.Allow = false;
     }
 }
Beispiel #2
0
        public void On079Elevator(Player079ElevatorEvent ev)
        {
            System.Random muertos = new System.Random();
            int           eventod = muertos.Next(0, 15);

            if ((eventod == 0) || (eventod == 1))
            {
                ev.Player.ChangeRole(Role.CHAOS_INSURGENCY);
            }
            if ((eventod == 2) || (eventod == 3))
            {
                ev.Player.ChangeRole(Role.CLASSD);
            }
            if ((eventod == 4) || (eventod == 5))
            {
                ev.Player.ChangeRole(Role.NTF_COMMANDER);
            }
            if ((eventod == 6) || (eventod == 7))
            {
                foreach (Player player in Smod2.PluginManager.Manager.Server.GetPlayers())
                {
                    player.ThrowGrenade(GrenadeType.FLASHBANG, true, new Vector(0, 0, 0), true, player.GetPosition(), false, 0);
                    player.ThrowGrenade(GrenadeType.FRAG_GRENADE, true, new Vector(0, 0, 0), true, player.GetPosition(), false, 0);
                }
            }
            if ((eventod == 8) || (eventod == 9))
            {
                ev.Player.ChangeRole(Role.FACILITY_GUARD);
            }
            if ((eventod == 14))
            {
                ev.Player.Kill();
            }
            if ((eventod == 15))
            {
                ev.Player.Scp079Data.MaxAP = 99999;
            }
        }