Raised This Month: $ Target: $400
 0% 

Advertisements 2.1 (Updated 2021/02/06)


Post New Thread Reply   
 
Thread Tools Display Modes
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-29-2011 , 01:32   Re: Advertisements 0.5.5
Reply With Quote #1121

Quote:
Originally Posted by sinblaster View Post
I wish someone would kill that fucking cry smily
Bacardi is offline
cssnik
Member
Join Date: Apr 2011
Location: Russia
Old 04-29-2011 , 03:51   Re: Advertisements 0.5.5
Reply With Quote #1122

How to fix the problem?

UPD: all works )

Last edited by cssnik; 04-30-2011 at 11:33. Reason: all works
cssnik is offline
wartech18
Member
Join Date: Mar 2011
Location: Sweden
Old 04-30-2011 , 11:09   Re: Advertisements 0.5.5
Reply With Quote #1123

Hi, the plugin is very useful and i like it alot, but when a message comes up you cant change weapon -.-
wartech18 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-30-2011 , 11:31   Re: Advertisements 0.5.5
Reply With Quote #1124

  1. #160
  2. #214
  3. #410
  4. #1025
  5. #1124
Quote:
Originally Posted by DJ Tsunami View Post
Type

This field can contain the following letters:


C
A center message, like sm_csay.
H
A hint message, like sm_hsay.
M A menu message, like sm_msay, but without the title or the Exit-option. 0 will still hide the message though. Will block 1-9 from switching weapons as long as it's showing.
S A chat message, like sm_say. It supports the following colors: {DEFAULT}, {TEAM}, {GREEN} and {LIGHTGREEN}. {TEAM} and {LIGHTGREEN} unfortunately don't work together in a single advertisement, so it's one or the other. For example: {GREEN}Current {LIGHTGREEN}Map: {DEFAULT}{CURRENTMAP}
T
A top-left message, like sm_tsay. It supports one of the following colors: {WHITE}, {RED}, {GREEN}, {BLUE}, {YELLOW}, {PURPLE}, {CYAN}, {ORANGE}, {PINK}, {OLIVE}, {LIME}, {VIOLET} and {LIGHTBLUE}. You can omit the color if you just want the normal color. For example to have an orange message, set text to: {ORANGE} Text here

Multiple types per advertisement are allowed, so you can show a single advertisement in multiple places at the same time.
Bacardi is offline
cssnik
Member
Join Date: Apr 2011
Location: Russia
Old 04-30-2011 , 11:42   Re: Advertisements 0.5.5
Reply With Quote #1125

Is it possible to increase amount of characters in the advertising message (text type "S") ?

Last edited by cssnik; 04-30-2011 at 11:50.
cssnik is offline
nightrider
SourceMod Donor
Join Date: Dec 2008
Old 05-02-2011 , 13:34   Re: Advertisements 0.5.5
Reply With Quote #1126

From first post
\n for newlines (confirmed to work for C, M and S messages)
__________________
[SIGPIC][/SIGPIC] the pantless
I am the Night Rider!, I'm a fuel-injected suicide machine.
I am a rocker! I am a roller!, I am an out-of-controller!


nightrider is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 05-02-2011 , 18:40   Re: Advertisements 0.5.5
Reply With Quote #1127

Quote:
Originally Posted by nightrider View Post
From first post
\n for newlines (confirmed to work for C, M and S messages)
You're still limited to 254 bytes (Or less, depending on the message).
KyleS is offline
blue zebra
BANNED
Join Date: Jun 2010
Old 05-03-2011 , 12:33   Re: Advertisements 0.5.5
Reply With Quote #1128

How can i use UTF8 based advert texts with this plugin? Now if i try to use UTF8 based characters, the adverts shown only 1-2-3 times, then never not.
blue zebra is offline
ViRaGisTe
Member
Join Date: Feb 2011
Old 05-08-2011 , 04:29   Re: Advertisements 0.5.5 (Updated 05/26/08)
Reply With Quote #1129

Quote:
Originally Posted by sinblaster View Post
cool

As a rule, generally when a writer places things thing s like this in a post without stating that it generates a cfg of its own, you need to add cvars to a cfg, server.cfg or sometimes autoexec.cfg

Code:
sm_advertisements_enabled (0/1, def 1)
Enable/disable displaying advertisements.

sm_advertisements_file (def "advertisements.txt")
File to read the advertisements from. Useful if you're running multiple  servers from one installation, and want to use different advertisements  per server.

sm_advertisements_interval (def 30)
Amount of seconds between advertisements.

sm_advertisements_reload
Server command to reload the advertisements from advertisements.txt.
but you'll always be a noob son, youre from QLD like I am. You probably live next door for all I know.

well you can add a autoconfig line after cvars declarations


Code:
public OnPluginStart() {
    CreateConVar("sm_advertisements_version", PL_VERSION, "Display advertisements", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
    g_hEnabled        = CreateConVar("sm_advertisements_enabled",  "1",                  "Enable/disable displaying advertisements.");
    g_hFile           = CreateConVar("sm_advertisements_file",     "advertisements.txt", "File to read the advertisements from.");
    g_hInterval       = CreateConVar("sm_advertisements_interval", "30",                 "Amount of seconds between advertisements.");
    
AutoExecConfig(true, "advertisment");
.
.
.

}
here you go ver0.5.5 creates its own cfg
Attached Files
File Type: sp Get Plugin or Get Source (advertisements.sp - 330 views - 11.4 KB)
File Type: smx advertisements.smx (9.2 KB, 163 views)
ViRaGisTe is offline
sinblaster
Grim Reaper
Join Date: Feb 2010
Location: Australia
Old 05-08-2011 , 06:08   Re: Advertisements 0.5.5
Reply With Quote #1130

What you explain is OK but in this case actually misses an important cvar which is
sm_advertisements_reload "1"

So for anyone that was taking this on face value they would loose out.
__________________
Happy Happy Joy Joy

sinblaster 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 11:45.


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