Exemplo n.º 1
0
 public void OnGeneratorUnlock(PlayerGeneratorUnlockEvent ev)
 {
     if (h == true)
     {
         ev.Allow = false;
     }
 }
Exemplo n.º 2
0
        public void OnGeneratorUnlock(PlayerGeneratorUnlockEvent ev)
        {
            if (cm.GetBoolValue("rank_enabled", true))
            {
                DBConnection db = new DBConnection(main);

                switch (ev.Player.TeamRole.Team)
                {
                case Smod2.API.Team.CLASSD:
                    db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_generator_unlock_classd"));
                    break;

                case Smod2.API.Team.CHAOS_INSURGENCY:
                    db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_generator_unlock_ci"));
                    break;

                case Smod2.API.Team.NINETAILFOX:
                    db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_generator_unlock_ntf"));
                    break;

                case Smod2.API.Team.SCIENTIST:
                    db.AddPoint(ev.Player.SteamId, main.GetConfigInt("rank_point_generator_unlock_scient"));
                    break;
                }
            }
        }
Exemplo n.º 3
0
 void IEventHandlerGeneratorUnlock.OnGeneratorUnlock(PlayerGeneratorUnlockEvent ev)
 {
     send(ev, new IdMapping()
          .appendId(Lib.EVENT_GENERATOR_ID, ev.Generator)
          .appendId(Lib.EVENT_GENERATOR_ROOM_ID, ev.Generator.Room)
          .appendId(Lib.PLAYER_ID, ev.Player)
          .appendId(Lib.PLAYER_EVENT_SCPDATA_ID, ev.Player.Scp079Data)
          .appendId(Lib.PLAYER_EVENT_TEAM_ROLE_ID, ev.Player.TeamRole)
          );
 }