public void OnGeneratorUnlock(PlayerGeneratorUnlockEvent ev) { if (h == true) { ev.Allow = false; } }
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; } } }
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) ); }