Skip to content

2.2. Configuration: Advertisements

shavit edited this page Aug 2, 2017 · 1 revision

Path to configuration file: addons/sourcemod/configs/shavit-advertisements.cfg

The shavit-misc component of bhoptimer will post chat advertisements by default.

The advertisement feature will cycle between all of the advertiements defined in addons/sourcemod/configs/shavit-advertisements.cfg.

To disable the advertisements, open cfg/sourcemod/plugin.shavit-misc.cfg, find shavit_misc_advertisementinterval and set the value to 0.0. You can also change the interval. The setting is by seconds, default is 10 minutes (600 seconds).
Restart your servers for the changes to apply.

Configuration

This is the default configuration file (addons/sourcemod/configs/shavit-advertisements.cfg):

// Configuration file for chat advertisements.
//
// Advertisements will cycle from the first one to the last one and will show up every time 
//
// Possible color values are the ones from shavit-messages.cfg:
// {text} {warning} {variable} {variable2} {style}
//
// Extra:
// {name} - name of the player who receives the message.
// {map} - current map.
// {timeleft} - time left (formatted like timers including the .0).
// {timeleftraw} - time left in seconds.
// {serverip} - server IP (requires SteamWorks).
// {hostname} - hostname.
//
// All messages will have the prefix that is defined inside configs/shavit-messages.cfg.
//
"Advertisements"
{
	"0" "You may write {variable}!hide{text} to {variable2}hide{text} other players."
	"1" "The command {variable}!r{text} will {variable2}restart your timer{text}."
	"2" "{variable}!recent{text} can be used to see the latest world records set!"
	"3" "{variable}!style{text} will open a menu with every {variable2}bhop style{text} the server has to offer."
}

The way it's setup is pretty self explanatory. If it isn't, here's a different example:

"Advertisements"
{
	"0" "Welcome to {variable}{hostname}{text}!"
	"1" "{warning}Hey, {name}!{text} We are recruiting staff members! Please visit our forums at {variable}https://my.websi.te/"
	"2" "Add our {variable}server{text} to your {style}favorites{text}! {variable2}{serverip}"
	"3" "Time left: {timeleft}"
	"4" "Current map: {map}"
}