I have made a simple Advertisement plugin, normally working for any games. But i have tested only on Csgo.
Advert interval
Time in minutes between adverts. (Must be an integer)
Advert order
Define the appearance order of advert.
0 - Follow order of advert in json file.
1 - Get random advert.
Example :
Code: Select all
{
"Adverts": [
{
"type": "say",
"message": "Welcome on {hostname} !",
"translation": "say:1"
},
{
"type": "say",
"message": "The current map is {currentmap}",
"translation": "say:2"
},
{
"type": "hint",
"message": "Kill them all ! [Friendlyfire : {mp_friendlyfire}]",
"translation": "hint:1"
},
{
"type": "hud",
"message": "The time is {time}",
"translation": "hud:1"
}
]
}
The translation attribute must contains the key of advert translation and must refer to a key in 'advertissement_server.ini'. If "translation" attribute is defined you are not oblige to write something in "message" key.
Code: Select all
{
"Adverts": [
{
"type": "say",
"message": "",
"translation": "say:1"
}
]
}
In the message of advert you can also add color. Use the default color available in your game for example in Csgo if i want green i can add \x04.
Define template variables :
- {currentmap} : Show current map name
- {date} : Show current date
- {time} : Show current time
Other variables :
You can also show all cvar of your server, like mp_friendlyfire, mp_roundtime ...
Sincerly Existenz.
Ps : Thanks to Satoon for his advert system (viewtopic.php?f=37&p=10430#p10426)