A plugin for cs that allows you to show ads in chat/center
Chat:
Center:
- Install ModSharp
- Download Advertisement
- Unzip the archive and upload it to the game server
The config is created automatically
[
{
"Interval": 5,
"Messages": [
{
"Chat": "{info_status}",
"Center": "{center_date}"
},
{
"Center": "{info_server}"
},
{
"Chat": "{chat_social}"
}
]
}
]The plugin supports translations, but they are optional. You can write raw text directly in the config if you prefer.
To use the translation system: Define your translations in the language file.
Use the key format {KEY_NAME} in your Advertisement.json.
If you have "my_message" in your lang file, put {my_message} in the config.
This plugin supports ModSharp Dynamic Natives. Other plugins can register custom tags to be used in advertisements.
For Developers:
Register a function returning an object via RegisterDynamicNative.
- Supported signatures:
Func<IPlayerController, object>orFunc<object>.
Example:
Code: RegisterDynamicNative(this, "MyPlugin::Credits", (Func<IPlayerController, object>)GetPlayerCredits);
Config: Your credits: {MyPlugin::Credits}
{White}, {DarkRed}, {Pink}, {Green}, {LightGreen}, {Lime}, {Red}, {Grey}, {Yellow}, {Gold}, {Silver}, {Blue}, {DarkBlue}, {Purple}, {LightRed}, {Muted}, {Head}
{MAP} - current map
{TIME} - server time
{DATE} - current date
{IP} - server ip
{PORT} - server port
{PLAYERS} - number of players on the server
{MAXPLAYERS} - how many slots are available on the server
\n OR {N} - new line