Raised This Month: $ Target: $400
 0% 

Advertisements 2.1 (Updated 2021/02/06)


Post New Thread Reply   
 
Thread Tools Display Modes
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 11-29-2013 , 13:27   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1711

The example file below is located at addons/sourcemod/configs/advertisements.txt
Of course make sure the plugin is located in addons/sourcemod/plugins
Code:
"Advertisements"
{
    "1"
    {
        "type"        "C"
        "text"        "Remember to adhere to all rules located in the MOTD!"
    }
    "2"
    {
        "type"        "S"
        "text"        "[{GREEN}DONATE{DEFAULT}] Server costs are a{RED} BITCH{DEFAULT}, consider donating, thanks!"
        "flags"       "o"
    }
}
I have specified "flags" "o" so that only donators or ranked admins do not see this ad.
Quote:
Flags

This field is optional. It accepts a list of flags of admins that will not see the advertisement if they have any of those flags. If left empty, only admins will see the advertisement. If omitted everyone will see the advertisement.
Please note that if you are using Simple Chat Colors, this plugin won't work.
Maxximou5 is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 11-29-2013 , 19:42   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1712

Quote:
Originally Posted by Maxximou5 View Post
Please note that if you are using Simple Chat Colors, this plugin won't work.
I use both plugins fine.
__________________
11530 is offline
Moobs
Junior Member
Join Date: Nov 2013
Old 11-29-2013 , 23:36   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1713

got it working, thanks guys
Moobs is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 11-29-2013 , 23:39   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1714

Quote:
Originally Posted by 11530 View Post
I use both plugins fine.
Not possible, you must be using 2009 edition for their to be conflicts with CS:GO.
Maxximou5 is offline
JEnglish
Junior Member
Join Date: Feb 2012
Old 11-30-2013 , 01:59   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1715

Quote:
Originally Posted by Maxximou5 View Post
Working fine for me on several servers.

No flags for everyone, flags are for limiting.
cheers max
__________________
Visit my forums Simpsons Gungame Turbo /Battlefield 3 servers
www.NoMercyKillers.com
JEnglish is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 11-30-2013 , 12:59   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1716

Quote:
Originally Posted by Maxximou5 View Post
Not possible, you must be using 2009 edition for their to be conflicts with CS:GO.
Oh, CS:GO. Didn't know that particular conversation was limited to one game.
__________________
11530 is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-11-2013 , 10:10   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1717

I believe it starts from the beginning - I'm basing this off of memory of seeing the ads in-game and not reviewing the code...

...:: TnT Edit ::...
PHP Code:
public OnMapStart() {
    
ParseAds();
    
    
g_hTimer          CreateTimer(GetConVarInt(g_hInterval) * 1.0Timer_DisplayAds_TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);

Looks like it starts from the beginning. So, if you have 80 ads and set it to advertise every 60 seconds, and maptime is less than 80 minutes, you'll never see all of your ads.
__________________
View my Plugins | Donate

Last edited by TnTSCS; 12-11-2013 at 10:11.
TnTSCS is offline
foxyloxy
Member
Join Date: Dec 2013
Old 12-16-2013 , 01:54   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1718

where do you put these cvars?

sm_advertisements_interval

??
foxyloxy is offline
Konstantin
Senior Member
Join Date: Nov 2012
Old 12-18-2013 , 21:35   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1719

Quote:
Originally Posted by foxyloxy View Post
where do you put these cvars?

sm_advertisements_interval

??
sourcemod.cfg
__________________
OS: Linux
Gameserver: CS:GO Mini Games
Konstantin is offline
Dreamgun
New Member
Join Date: Sep 2013
Old 12-21-2013 , 05:52   Re: Advertisements 0.6 (Updated 2013/03/08)
Reply With Quote #1720

So I've seen red text working in chat on some CS:GO servers... but using this plugin on a CS:GO server I setup doesnt seem to be working for me... I've attempted saving the file as UTF-8 without BOM, as well as figured out by myself you need a space, or character in front of the advertisement in order for color to work at the beginning.

Anyways, what am I missing to get red chat to work! ... and yea I did look over the thread a bit "it's over 150 pages long" so I might of missed another tweak.
Dreamgun is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode