Raised This Month: $66 Target: $400
 16% 

Random quotes


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Xanimos (85)
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-19-2006 , 12:46   Random quotes
Reply With Quote #1

Code:
/* /* *  AMX Mod X script * *   Random Quotes * *   by Lt Llama * *  WHAT IS THIS? *  ==================== *   Some things people say on servers should be immortalized. *   And who says only celebrities deserve to be quoted? *   Now you can add cool quotes from your gaming buddys. *   The plugin picks a random line from the quote file and shows it in intervals. *   Admins with ADMIN_CFG access can add new quotes. * *   Or just any random messages you want the players to see. * *  CVARS *  ======================= *   amx_quote_interval <seconds> : sets the interval when quotes are shown. (default 10 minutes) *   amx_showquotee <1/0>        : 1 = show quote and quoteds name. 0 = show only quote *   amx_quote_hud <1/0>        : 1 = show quote on hud. 0 = show quote in chat *                 (If in chat the quoted is not shown). * *   To change a cvar ingame type: *   amx_cvar amx_showquotee <0/1> *   amx_cvar amx_quote_hud <0/1> * *   (does not work with amx_quote_interval as this is a task looping) * *  USER COMMANDS *  ============= *   amx_addquote      : To add a simple quote type *              amx_quote "Cows are cool" *            : To add a quote and quoted *              amx_quote "Cows are cool # Lt Llama" *              (Don't forget put "" around the string) *  VERSIONS *  ======== *  1.1      - Added amx_quote_hud + enlarged arrays. *  1.0      - First working version (2006-09-19) */

Example of content of the randomquotes.cfg:

Quote:
/*** START OF RANDOM QUOTES FILE ***\
Cows are cool
My isp gives me random high pings because they hate me # Player
I don't get this map # Player
Pull your mouse down as much as you can # Player(2)
I'm eating my tea # Player
How do you make maps for TFC? # Player(32)
Hope you find it useful

/Lt.
Attached Files
File Type: sma Get Plugin or Get Source (randomquotes.sma - 1450 views - 5.8 KB)
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.

Last edited by Lt Llama; 05-10-2008 at 06:32.
Lt Llama is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Location: Germany (GMT+1)
Old 09-19-2006 , 14:54   Re: Random quotes
Reply With Quote #2

Nice one! +Karama for you!
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 09-20-2006 , 02:51   Re: Random quotes
Reply With Quote #3

Its a good idea and plugin, however i would prefer that the quotes be shown in normal chat area (print_chat perhaps?) and also if "#" be taken out of quotes which are not quoted from the players. I mean just show the quote and nothing else like the # or who quoted it . Hmmm but if the text is show in the chat are (print_chat) I suppose there will be a max character # restriction? so long quotes may get cut off whereas in hud show message the quote can be quite long.

hmm i dunno , just some things i would prefer but hey thats just me , but overall nice job on the plugin.
Squallkins is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-20-2006 , 03:14   Re: Random quotes
Reply With Quote #4

Quote:
Originally Posted by Silencer123 View Post
Nice one! +Karama for you!
Banzai! Karama

Thx

/Lt
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-20-2006 , 03:21   Re: Random quotes
Reply With Quote #5

Quote:
Originally Posted by .:{EK}:. SQUALL View Post
Its a good idea and plugin, however i would prefer that the quotes be shown in normal chat area (print_chat perhaps?) and also if "#" be taken out of quotes which are not quoted from the players. I mean just show the quote and nothing else like the # or who quoted it . Hmmm but if the text is show in the chat are (print_chat) I suppose there will be a max character # restriction? so long quotes may get cut off whereas in hud show message the quote can be quite long.

hmm i dunno , just some things i would prefer but hey thats just me , but overall nice job on the plugin.
I add a cvar where you can choose print_chat or hud_message.
I keep the # sign in the hud message, me wubs # signs .
The length is no problem, I can make a length check before printing to print_chat, if its to long i'll print it as a hud_message.

/Lt.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama is offline
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 09-20-2006 , 03:56   Re: Random quotes
Reply With Quote #6

Hey thanxx and nice job +Karma

Waiting for the updated/edited version

Last edited by Squallkins; 09-20-2006 at 03:58.
Squallkins is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-20-2006 , 04:07   Re: Random quotes
Reply With Quote #7

I have to change the way it picks a quote to. No need to store every quote in an array. Takes to much memory. Should have thought of that before.

/Lt.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 09-20-2006 , 15:48   Re: Random quotes
Reply With Quote #8

Updated to 1.1.
Added a cvar to select if you want the quote to be shown on hud or in chat.
Havent changed the way it picks the quotes yet. I'll do that later.

Test and see if it works for you

/Lt.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama is offline
Old 10-19-2006, 12:41
SweatyBanana
This message has been deleted by SweatyBanana. Reason: wrong post
Gravy Baby
BANNED
Join Date: Jan 2007
Old 01-23-2007 , 02:43   Re: Random quotes
Reply With Quote #9

can you change the color of the text in normal chat mode?
Gravy Baby is offline
Lt Llama
Senior Member
Join Date: Aug 2004
Old 01-23-2007 , 05:20   Re: Random quotes
Reply With Quote #10

Quote:
Originally Posted by Gravy Baby View Post
can you change the color of the text in normal chat mode?
Not for client_print but it can be changed when its a hud message.
I could build in a color selection menu but I think its a bit overhead for this small plugin.

If you don't like the color of the hudmessage look up this line:
Code:
set_hudmessage( 200, 100, 0, 0.0, 0.0, 0, 6.0, 20.0, 0.3, 0.3, 4 )

where the first three numbers are 200 = red, 100 = green, 0 = blue.
Change to what you like in the code and paste the source here to compile:
http://www.amxmodx.org/webcompiler.cgi

and Voila you have just made your own version of Random quotes.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama 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 23:19.


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