Raised This Month: $7 Target: $400
 1% 

Autoresponder and Advertiser (with color and conditions!)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Brad (55)
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 04-30-2006 , 08:44   Autoresponder and Advertiser (with color and conditions!)
Reply With Quote #1

FILLFILLFIFILLMaximusBrood proudly presents:
Autoresponder/Advertiser Version 0.5

Description:

This plugin is usefull to every server:

* Display messages on random times WITH COLOR
* React on people saying things, for example,

FILLFLFwhen somone says 'cheat', the server reacts with 'To report a cheater, use teamspeak and begin your message with an @'

These two functions are controlled in a simple textfile in your configs directory.

An advertisement will display itself every 60 to 80 seconds (this is random)
This number is defined, and can be changed with constants

There is a new feature in 0.5: Conditions!
You can for example do, that a certain message will only display itself when the map is de_dust. Or when there are minimal 5 players in the server.

------------------------------------------------------------------------------

Normal Messages

If you want an advertisement that displays itselfs, just put the message on 1 line:
Quote:
Originally Posted by Example
Our webiste is: www.serverwebsite.com
------------------------------------------------------------------------------

Messages with color

Colors are only available in CounterStrike because its limited to that game DLL!

You can also insert COLOR. !t for teamcolor, !g for green color, !n for normal (yellow) color:
Quote:
Originally Posted by Example
!gOur !twebiste !gis!n: serverwebsite.com
Will give this result ingame:
Quote:
Originally Posted by Result
Our webiste is: serverwebsite.com
------------------------------------------------------------------------------

Autoresponder

The second functionality is to react on what people say.
This is also handled in the textfile, with the following syntax

Quote:
Originally Posted by Example
@cheat~To report a cheater, use amx_chat in console
Just begin your a new line with a @, and it will understand that it is a say catch.
Devide the thing that the player has to say, and what the server has to answer, with a ~ (tilde -> shift+ key left of 1)

So in this example, when someone says cheat (cheater, cheats, cheatz), the server will react with the sentence after the ~ (tilde)

You can use COLOR here too!

Quote:
Originally Posted by Example
@cheat~!gTo report a cheater, !nuse amx_chat in !tconsole
So when someone says "Z0MG Y00 CHEAT3RZ0RZ!!!11"
The server will react with:

Quote:
Originally Posted by Server
To report a cheater, use amx_chat in console
------------------------------------------------------------------------------

Conditions

Conditions are very usefull as they can make sure that certain messages are only displayed when the given conditions are met.
This too, is handled in the textfile.

The things you can control are now: (there will be more conditions later, please suggest them!)
  • Map
  • Minimum Players playing
  • Maximum Players playing
The syntax is simple, but strict.

For a normal message:
Quote:
Originally Posted by Example
%map cs_assault%~Terrorists are !g NOT !nallowed to camp at the hostages!
And for the autoresponder:
Quote:
%map cs_assault%~@camper~Terrorists are !g NOT !nallowed to camp at the hostages!
For minimum players:
Quote:
Originally Posted by Example
%min_players 6%~There are 6 players in the server, so !gWeapons Arena!n is enabled!
For maximum players:
Quote:
Originally Posted by Example
%max_players 5%~There are less then 6 players in the server, so !gWeapons Arena!n is disabled!
You can also do multiple conditions, like this:
Quote:
Originally Posted by example
%map de_dust%min_players 6%~Map is dust, and there are 6 players or more, !tCSDM!n is enabled!
I think you can imagine that there are many uses for this function!
  1. Just let the plugin know you are using conditions by typing a % at the begin.
  2. Then the type of the condition; map, min_players or max_players.
  3. Then the value of the condition. I.E. de_dust for the map, or 6 for min_players.
  4. Exit the condition you are working on with a %. You can now return to step 2 to add a new condition, or end the condition list with a ~ (tilde)

------------------------------------------------------------------------------

Cvar's:

ad_react_all - Controls if it should react to all when a keyword is said. Or only to the person who actually said it. (default 1)

------------------------------------------------------------------------------

You only need to make a advertisements.ini file in your configs directory. (addons/amxmodx/configs/advertisements.ini)
A sample file is included in the zip.

Happy advertising

(Source file and zipfile had 15336 and 16039 views before reupload)
Attached Files
File Type: sma Get Plugin or Get Source (ad_manager.sma - 53729 views - 8.8 KB)
File Type: zip ad_manager.zip (21.9 KB, 57081 views)
__________________
Released six formerly private plugins. Not active here since ages.

Last edited by MaximusBrood; 04-13-2010 at 10:56.
MaximusBrood is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 04-30-2006 , 08:44  
Reply With Quote #2

Credits:
  • Damaged Soul and BlueRaja -> For finding the colored text solution and putting it into a plugin
  • Teame06 -> Who pointed me to use a max of 191 characters when printing colors
  • redParadise -> Requested the 'react only the player who triggered it' function
  • CurryKing -> Requested that messages should be displayed after each other, instead of through each other

Change Log:

V0.1
  • Pre-prelease (without say hook, color and conditions)
V0.2
  • Initial release

    V0.21
    • Fixed 191 character bug
    V0.22
    • Added option to, instead of reacting all, only react to the player who triggered it
V0.3
  • Added system where messages are not displayed simoultaniously, but wait for each other
  • Made sure plugin was broken and didn't work
V0.4/V0.5
  • Rewrote whole plugin from the ground off
    • Color is handled on load now
    • Less CPU intensive
    • Fixed color bug
    • Using fgets instead of read_file
  • Added Conditions
  • Renewed task system

Known Problems:
  • Colors are only available in CounterStrike because its limited to that game DLL
  • Because CS doens't allow me to, you can't see red color as CT and blue color as T
__________________
Released six formerly private plugins. Not active here since ages.

Last edited by MaximusBrood; 10-26-2013 at 16:07.
MaximusBrood is offline
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 04-30-2006 , 12:20  
Reply With Quote #3

Pictures Please, oh and + karma.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 04-30-2006 , 12:57  
Reply With Quote #4

Quote:
Originally Posted by Compiler
/home/groups/amxmodx/compiler3/include/string.inc(181) : error 017: undefined symbol "szRightt"
/home/groups/amxmodx/compiler3/include/string.inc(181) : warning 215: expression has no effect
/home/groups/amxmodx/compiler3/include/string.inc(181) : warning 215: expression has no effect
/home/groups/amxmodx/compiler3/include/string.inc(181) : error 001: expected token: ";", but found ")"
/home/groups/amxmodx/compiler3/include/string.inc(181) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/compiler3/include/string.inc(181) : fatal error 107: too many error messages on one line
didn't compile for me
Deviance is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 04-30-2006 , 12:59  
Reply With Quote #5

The webcompiler is broken. As you can see the include file is malfunctioning, not my plugin!

Just use the normal compiler until the webcompiler is fixed
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 04-30-2006 , 13:00  
Reply With Quote #6

Quote:
Originally Posted by MaximusBrood
The webcompiler is broken. As you can see the include file is malfunctioning, not my plugin!

Just use the normal compiler until the webcompiler is fixed
i thougt they fixed that long time ago

okey gonna try...

EDIT: yeah, its the webcompiler that's the wrong

anyway's, gj
Deviance is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-30-2006 , 13:29  
Reply With Quote #7

Awesome.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 04-30-2006 , 13:59  
Reply With Quote #8

The screenies do load in firefox...Liar
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 04-30-2006 , 16:29  
Reply With Quote #9

zomg... I want that knife model may i have it

and it didnt compile right for me either.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 04-30-2006 , 16:58  
Reply With Quote #10

Quote:
Originally Posted by Charming
zomg... I want that knife model may i have it

and it didnt compile right for me either.
Just use the compiler on your own computer.

Don't use the webcompiler. It's broken and it won't compile good for everyone.

P.S. Why is everyone giving me -karma... A week ago I had +40 karma
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Reply


Thread Tools
Display Modes

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 02:35.


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