CountryFlags: Display country flags on the CS2 scoreboard based

SwiftlyS2 Country Flags

Display country flags on the CS2 scoreboard based on player IP location

Source 2 Version .NET


Github:


Platform Support

Platform Status
Windows Maintenance
Linux Maintenance

Requirements

Installation

  1. Download the latest release
  2. Extract plugin to addons/swiftlys2/plugins/swiftlyS2-countryflags/
  3. Restart the server
  4. Configure config.jsonc (optional)

Note: GeoLite2-Country.mmdb is already included in the data/ folder.

Configuration

Option Type Default Description
Enabled bool true Enable/disable the plugin
Debug bool false Enable debug logging
DefaultStatus bool true Show flag by default for new players
EnableToggleCommand bool true Allow players to toggle flag display
CacheExpiryHours int 168 Hours before refreshing country (7 days)
AutoSaveIntervalSeconds int 120 Auto-save cache interval (0 = disable)
DefaultBadgeId int 1079 Badge ID for unknown countries
CountryBadges object {...} Country code to badge ID mapping

Commands

Command Description
!flag Toggle country flag display
!cf Alias for !flag

Supported Languages

Country Badge Mappings

The plugin includes 70+ pre-configured country-to-badge mappings including:

  • :european_union: Europe: NL, FR, GB, RU, DE, PL, SE, NO, FI, ES, IT, GR, TR, UA, CZ, AT, CH, BE, etc.
  • :united_states: North America: US, CA
  • :brazil: South America: BR, AR, CL, CO, PE, MX
  • :japan: Asia: CN, JP, KR, TH, ID, MY, VN, IN, KZ
  • :saudi_arabia: Middle East: SA, AE, IL, LB
  • :australia: Oceania: AU
  • :egypt: Africa: EG, TN, DZ, MA

You can customize these mappings in config.jsonc.

Building from Source

Requirements

Build

git clone https://github.com/zhw1nq/swiftlyS2-countryflags.git
cd swiftlyS2-countryflags
dotnet restore
dotnet build

Publish

dotnet publish -c Release

Output directory: build/publish/swiftlyS2-countryflags/

Credits

License

This project is licensed under the MIT License.