Raised This Month: $ Target: $400
 0% 

Autoresponder and Advertiser (with color!)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-19-2006 , 15:27   Autoresponder and Advertiser (with color!)
Reply With Quote #1

Autoresponder/Advertiser Version 0.3
by MaximusBrood

Description:
This plugin has 2 main purposes

* Advertise 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 45 to 120 seconds (this is random)
This number is defined, and can be changed with constants

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

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
------------------------------------------------------------------------------

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
------------------------------------------------------------------------------

The second functionality is to react on what people say.
This is also handled in a 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.
So in this example, when someone says cheat (cheater, cheats, cheatz), the server will react with the sentence after the double dots

You can use COLOR here too:

Quote:
Originally Posted by Example
@cheat:!gTo report a cheater, !nuse amx_chat in !tconsole
------------------------------------------------------------------------------

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)

ad_wait_between_messages - Controls if it should wait ad_between_time seconds between each advertisement. (default 0)

ad_between_time - Time in seconds that the plugin should wait between each advertisement, only if fillfillfillfillfillfillfillfillfillfillfillf illad_wait_between_messages is 1 (default 30)

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

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
Attached Files
File Type: sma Get Plugin or Get Source (ad_manager.sma - 1912 views - 5.0 KB)
File Type: zip ad_manager.zip (12.5 KB, 681 views)
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-19-2006 , 15:29  
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

Change Log

v0.1
  • Pre-prelease (without say hook and color)
v0.2
  • Initial Release

    v0.21
    • Fixed 191 character bug (thnx Teame06)
    v0.22
    • Added option to, instead of reacting all, only react to the player who triggered it (thnx redParadise)
v0.3
  • Added system where messages are not displayed simoultaniously, but wait for each other (thnx Curryking)
  • Rewrote almost whole plugin flow
  • Rewrote color and message handling to be less CPU intensive (colors are now applied at file read)
  • Fixed major color bug

Known Problems
  • Colors are only availible in Counterstrike, because only that client dll has the option to view color (correct me if I'm wrong)
  • Because Counterstrike doesn't allow me to, you can't use red color as a CT or blue color as a T
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 01-19-2006 , 15:52  
Reply With Quote #3

Code:
new message[256]
<< Anything above 191 characters will crash the server when using this way to print color character.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-19-2006 , 16:03  
Reply With Quote #4

Quote:
Originally Posted by teame06
Code:
new message[256]
<< Anything above 191 characters will crash the server when using this way to print color character.
Thnx, updated to version 0.2.1
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-21-2006 , 05:31  
Reply With Quote #5

YAY, approved
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
[SMC]Neiko
Senior Member
Join Date: Dec 2005
Location: United States, Texas
Old 01-21-2006 , 13:09  
Reply With Quote #6

Very nice. I edited around the advertisments.ini, and will be tested upon my map change =P. Also, I'm hoping this works for all mods? And not just counter-strike?

One more thing, does !r count as red? or must I use !t even though I am not using counter-strike?
__________________

Sigs are overrated.
[SMC]Neiko is offline
Send a message via AIM to [SMC]Neiko Send a message via MSN to [SMC]Neiko Send a message via Yahoo to [SMC]Neiko
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-21-2006 , 13:22  
Reply With Quote #7

Quote:
Originally Posted by [SMC
Neiko]Very nice. I edited around the advertisments.ini, and will be tested upon my map change =P. Also, I'm hoping this works for all mods? And not just counter-strike?

One more thing, does !r count as red? or must I use !t even though I am not using counter-strike?
Oww, my plugin works for all mods, but I'm not sure if the colors will work for all mods

* Testing Now *
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
[SMC]Neiko
Senior Member
Join Date: Dec 2005
Location: United States, Texas
Old 01-21-2006 , 14:22  
Reply With Quote #8

Sadly the colors have no effect in Brain Bread. But it works.
__________________

Sigs are overrated.
[SMC]Neiko is offline
Send a message via AIM to [SMC]Neiko Send a message via MSN to [SMC]Neiko Send a message via Yahoo to [SMC]Neiko
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 01-21-2006 , 15:00  
Reply With Quote #9

Quote:
Originally Posted by [SMC
Neiko]Sadly the colors have no effect in Brain Bread. But it works.
Yeah, the colors only work with CounterStrike since only the counterstrike dll contains the function to color messages.
(maybe other mods have other color functions)

I made a list of known 'bugs', thanks for the info
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
redParadise
Junior Member
Join Date: Sep 2005
Old 01-24-2006 , 10:44  
Reply With Quote #10

Hi, nice plugin!!! I want to display @messages only this player who typed the keyword in. Who must i configure the sma therefore?
redParadise 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 14:38.


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