Server plug-in needed

Wrangler
A regular
A regular
Posts: 56
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Dec 12, 2013 10:16 pm

Server plug-in needed

Post by Wrangler »

I'm looking for an automated plug-in that will allow me to place broadcast messages in the game and have then execute every 30 seconds. Does anyone have anything they use on their server that works reliably that they can recommend?

I've already been recommended Advertisement .6 from AlliedModders but I'm not sure if this plug-in is automated as i need it or manually triggered.

Thanks in advance
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server plug-in needed

Post by soja »

The plugin you were recommended works fine.

All you need to do is add your advertisements to "configs/advertisements.txt". You can use the template https://forums.alliedmods.net/showthread.php?p=592536 on the plugin thread to make more.

You can then set sm_advertisements_interval in your server.cfg, this will control the time between adverts. The default is 30.
Not a NFO employee
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Thanks! Getting confirmation on what they recommended is very helpful. I'll give it a go.
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Sorry, sm_advertisements_interval isn't in my server.cfg. Is that something I need to add? Also is it sm _advertismenets or sv_adertisements?
doulos9
This is my homepage
This is my homepage
Posts: 200
Joined: Sun Sep 15, 2013 9:44 pm

Re: Server plug-in needed

Post by doulos9 »

Yes

//adverts
sm_advertisements_enabled 1
sm_advertisements_interval 30
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server plug-in needed

Post by soja »

Wrangler wrote:Sorry, sm_advertisements_interval isn't in my server.cfg. Is that something I need to add? Also is it sm _advertismenets or sv_adertisements?
You only need to add

Code: Select all

sm_advertisements_interval
to your server.cfg, if you want to use an interval other than every 30 seconds(default).

The plugin is enabled by default, so you don't need to add that.
Not a NFO employee
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Thanks, I've placed the statements and will see how it goes.
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Okay, I must have done something wrong because its not working.

Here is what I did

I added to the server.cfg
//advertisements
sm_advertisements_enabled 1
sm_advertisements_interval 15

An placed in the /csgo/addons/sourcemod/plugins
advertisements.smx

Did I do something wrong?
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server plug-in needed

Post by soja »

Wrangler wrote:Okay, I must have done something wrong because its not working.

Here is what I did

I added to the server.cfg
//advertisements
sm_advertisements_enabled 1
sm_advertisements_interval 15

An placed in the /csgo/addons/sourcemod/plugins
advertisements.smx

Did I do something wrong?
Where is your advertisements.txt located? Does it have the correct format? Anything in sourcemod error logs?
Not a NFO employee
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Like a dip I forgot to upload the advertisements.txt ...it works now. DOH!

Is there a way to keep the message on screen longer?
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Sheesh, never mind. Sometimes I cause me to question myself. :) Thanks for the help and the patience.
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

BAH!

Everything works fine except for color! Can anyone see anything I've done wrong that would prevent color from working?

"Advertisements"
{
"1"
{
"type" "S"
"text" "{GREEN}Enjoying the server? CSWARS is a community. Sign up at www.cswars2014.com"
}
"2"
{
"type" "S"
"text" "{GREEN}Admins needed for late-night hours. Make contact at www.cswars2014.com to find out how to become a CSWARS Admin"
}
"3"
{
"type" "S"
"type" "{GREEN}Gamesmanship is encouraged. Disrespecting other players through excessive vulgarity or racial slurs is not."
{
"4"
"type" "S"
"type" "{GREEN}Enjoying the server? Why not become an active part of the CSWARS Gaming Community? Sign up at www.cswars2014.com"
}
}
User avatar
soja
This is my homepage
This is my homepage
Posts: 2389
Joined: Fri May 18, 2012 3:20 pm

Re: Server plug-in needed

Post by soja »

Wrangler wrote:BAH!

Everything works fine except for color! Can anyone see anything I've done wrong that would prevent color from working?

"Advertisements"
{
"1"
{
"type" "S"
"text" "{GREEN}Enjoying the server? CSWARS is a community. Sign up at http://www.cswars2014.com"
}
"2"
{
"type" "S"
"text" "{GREEN}Admins needed for late-night hours. Make contact at http://www.cswars2014.com to find out how to become a CSWARS Admin"
}
"3"
{
"type" "S"
"type" "{GREEN}Gamesmanship is encouraged. Disrespecting other players through excessive vulgarity or racial slurs is not."
{
"4"
"type" "S"
"type" "{GREEN}Enjoying the server? Why not become an active part of the CSWARS Gaming Community? Sign up at http://www.cswars2014.com"
}
}
Is color broken for all?

Notice on your last 2 adverts you have "type" twice instead of "type" and "text"
Not a NFO employee
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

Yes, none of the colors work. I'll make the correction and see if that helps.
Wrangler
A regular
A regular
Posts: 56
Joined: Thu Dec 12, 2013 10:16 pm

Re: Server plug-in needed

Post by Wrangler »

SOLUTION

It turns out that a space is needed between the opening quote and the color designator. Without the space the color doesn't register.

eg. " {GREEN}Hell0"
Post Reply