Skip to content

sponex75/CS2-Advertisements-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📢 Advertisements Plugin for CS2

A simple and customizable advertisements plugin for Counter-Strike 2 servers using CounterStrikeSharp.

CS2 CounterStrikeSharp .NET

✨ Features

  • Automatic timed messages - Display advertisements at regular intervals
  • 🎨 Customizable colors - 12+ color options for each message
  • 📝 Multiple messages - Add unlimited advertisement messages
  • 🔧 Easy configuration - Simple JSON configuration file
  • 🎯 Prefix support - Add custom prefix to all messages (e.g., [SERVER])
  • Enable/Disable - Toggle individual messages or entire plugin
  • 🌐 Multi-line support - Display multiple lines at once

📋 Requirements

📦 Installation

  1. Download the latest release from Releases
  2. Extract the addons folder to your CS2 server directory:
    /game/csgo/
    
  3. Your folder structure should look like:
    game/csgo/addons/counterstrikesharp/
    ├── plugins/
    │   └── Advertisements/
    │       ├── Advertisements.dll
    │       ├── Advertisements.deps.json
    │       └── Advertisements.pdb
    └── configs/
        └── plugins/
            └── Advertisements/
                └── Advertisements.json
    
  4. Restart your server or load the plugin with css_plugins load Advertisements

⚙️ Configuration

Edit addons/counterstrikesharp/configs/plugins/Advertisements/Advertisements.json:

{
  "Enabled": true,
  "IntervalSeconds": 120.0,
  "RandomOrder": false,
  "ShowInCenter": false,
  "Prefix": "[SERVER]",
  "PrefixColor": "Green",
  
  "Messages": [
    {
      "Text": "========================================",
      "Color": "Gold",
      "Enabled": true
    },
    {
      "Text": "  Welcome to our server!",
      "Color": "Green",
      "Enabled": true
    },
    {
      "Text": "========================================",
      "Color": "Gold",
      "Enabled": true
    },
    {
      "Text": "> Visit our website: www.example.com",
      "Color": "LightBlue",
      "Enabled": true
    },
    {
      "Text": "> Discord: discord.gg/example",
      "Color": "Purple",
      "Enabled": true
    }
  ]
}

Configuration Options

Option Type Default Description
Enabled bool true Enable/disable the plugin
IntervalSeconds float 120.0 Time between advertisements (in seconds)
RandomOrder bool false Display messages in random order
ShowInCenter bool false Also show message in center of screen
Prefix string "[SERVER]" Prefix for all messages
PrefixColor string "Green" Color of the prefix

Message Options

Option Type Default Description
Text string "" The message text to display
Color string "Default" Color of the message
Enabled bool true Enable/disable this specific message

Available Colors

  • Default - White/Default color
  • White - White
  • Red - Red
  • Green - Green
  • Blue - Blue
  • Yellow - Yellow
  • Purple - Purple
  • Gold - Gold/Orange
  • LightBlue - Light Blue
  • Orange - Orange
  • Lime - Lime Green
  • Grey - Grey

🎮 In-Game Example

When configured, advertisements will appear in chat like this:

[SERVER] ========================================
[SERVER]   Welcome to our server!
[SERVER] ========================================
[SERVER] > Visit our website: www.example.com
[SERVER] > Discord: discord.gg/example
[SERVER] > Follow the server rules!
[SERVER] > Have fun playing!

🔧 Commands

This plugin runs automatically and requires no commands. Configuration changes require a server restart or plugin reload:

css_plugins reload Advertisements

📝 Tips

Recommended Intervals

  • 60 seconds - Very active servers with many ads
  • 90 seconds - Balanced, not annoying
  • 120 seconds - Standard (recommended)
  • 180 seconds - Less frequent
  • 300 seconds - Rare, important messages only

Best Practices

  1. Keep messages short and clear
  2. Use colors to highlight important information
  3. Don't spam too many messages
  4. Test your configuration before deploying
  5. Use ASCII characters only (avoid special Unicode characters)

🐛 Troubleshooting

Plugin not loading?

  • Check that CounterStrikeSharp is properly installed
  • Verify file permissions
  • Check server console for error messages

Messages not showing?

  • Ensure Enabled is set to true in config
  • Check that at least one message has Enabled: true
  • Verify IntervalSeconds is not too high
  • Restart the server after config changes

Special characters appearing as "â•"â•â•"?

  • Use only ASCII characters (no Unicode box-drawing characters)
  • Use simple characters like =, -, >, * instead

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Credits

📞 Support

If you encounter any issues or have questions:


⭐ If you like this plugin, please give it a star on GitHub!

About

Automatic timed advertisements plugin for CS2 servers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages