Raised This Month: $51 Target: $400
 12% 

Text Color Changer Menu (Mr. Satan)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff       
Mr. Satan
Senior Member
Join Date: Apr 2004
Location: Fort Wayne, Indiana
Old 07-01-2004 , 23:13   Text Color Changer Menu (Mr. Satan)
Reply With Quote #1

Funny what a bit of bordem can drive one to do.

I first asked for someone to make this FOR me (i had already made it for Admin Mod long ago but lost the source), then today I decided to try it myself and see what happens.

Well, it works and works good, it's just a simple little plugin but it's neat.

By typing /TColor in chat (Normal or Team) or typing TColor in console, a menu will appear on your screen, allowing you to choose between 22 different text colors!

This plugin is based heavily off of OLO's MenuFront.

Code:
// AMXX Text Color Changer Menu // By: Mr. Satan // Allows all users to call up a menu to change their text color. #include <amxmod> #include <amxmodx> #include <amxmisc> new g_nMenuPosition[33] #define MAX_MENU 22  //This is the number of options you have #define MAX_DISPLAY 8   //This is the number of Options per page (Dont change) #define MAX_PAGES 3  //This is the number of pages (MAX_MENU / MAX_DISPLAY [if Remainder > 0 Then +1]) new g_szMenuBody[ MAX_MENU ][ ] = { "*DEFAULT*", "*Sven Coop*", "Aqua", "Black", "Blue", "Brown", "Forest Green", "Gold", "Gray", "Green", "Light Red", "Maroon", "Navy Blue", "Orange", "Pink", "Purple", "Red", "Sea Green", "Sky Blue", "Teal", "White", "Yellow" } new g_szOptions[ MAX_MENU ][ ] = { "con_color 255+155+50", "con_color 180+220+255", "con_color 0+255+255", "con_color 0+0+0", "con_color 0+0+255", "con_color 102+076+0", "con_color 0+127+0", "con_color 219+178+0", "con_color 64+61+82", "con_color 0+255+0", "con_color 255+0+76", "con_color 127+0+0", "con_color 0+0+127", "con_color 240+138+0", "con_color 255+0+255", "con_color 127+0+127", "con_color 255+0+0", "con_color 117+255+87", "con_color 0+127+127", "con_color 0+229+107", "con_color 255+255+255", "con_color 255+255+0" } /*****************Declare Text Color Changer*****************/ public plugin_init() {     register_plugin("Text Color Changer","v1.0","Mr. Satan")     register_menucmd(register_menuid("Text Color Changer"),1023,"TextColorChoice")     register_concmd("TColor", "TColor", 0, "Brings up menu to change your text color.")     register_clcmd("TColor", "TColor",ADMIN_MENU,"- displays menus")     register_clcmd("say /TColor", "TColor")     register_clcmd("say_team /TColor", "TColor") } /*****************Function that calls Text Color Changer*****************/ public TColor(id) {     ShowMenu( id, g_nMenuPosition[id] = 0 )     return PLUGIN_HANDLED } public TextColorChoice( id, key ) {     switch( key )     {         case 8: ShowMenu( id, ++g_nMenuPosition[id] )         case 9: ShowMenu( id, --g_nMenuPosition[id] )         default: client_cmd( id, g_szOptions[g_nMenuPosition[id] * 8 + key] )     }       return PLUGIN_HANDLED } public ShowMenu( id, pos ) {     if ( pos < 0 ) return     new i, j = 0     new nKeys, nStart, nEnd, nLen     new szMenuBody[512]     nStart = pos * 8     if ( nStart >= MAX_MENU )     nStart = pos = g_nMenuPosition[id] = 0     nLen = format( szMenuBody, 511, "Text Color Changer - [%d/%d]^n^n", pos + 1, MAX_PAGES )     nEnd = nStart + MAX_DISPLAY     nKeys = (1<<9)     if ( nEnd > MAX_MENU ) nEnd = MAX_MENU     for ( i = nStart; i < nEnd; i++ )     {         nKeys |= (1<<j++)         nLen += format( szMenuBody[nLen], (511-nLen), "%d. %s^n", j, g_szMenuBody[i] )     }     if ( nEnd != MAX_MENU )     {         format( szMenuBody[nLen], (511-nLen), "^n9. MORE...^n0. %s", pos ? "BACK" : "EXIT" )         nKeys |= (1<<8)     }     else format( szMenuBody[nLen], (511-nLen), "^n0. %s", pos ? "BACK" : "EXIT" )     show_menu( id, nKeys, szMenuBody, -1 ) }
[/small]
Attached Files
File Type: sma Get Plugin or Get Source (amx_ms_tcolor.sma - 1909 views - 3.0 KB)
__________________
DITN's TEAMSPEAK Server @ ditn.sytes.net:8767
Mr. Satan is offline
Send a message via AIM to Mr. Satan Send a message via MSN to Mr. Satan Send a message via Yahoo to Mr. Satan
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-01-2004 , 23:22  
Reply With Quote #2

nice, will try out on my server.... lol not like u can see half of the chat anyways with all the text flying by from a ton of other plugins....
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 07-01-2004 , 23:24  
Reply With Quote #3

I will check this out, might be nice on the eyes, hopefully thier isnt too many light colors that are hard on the eyes.

BTW

You dont have to post the code on the post, by posting the .sma attachment you can download the source or compile the plugin on the fly .. much better for a much smaller first post.
__________________

BigBaller is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 07-01-2004 , 23:47  
Reply With Quote #4

Why did you include amxmod.inc and amxmodx.inc? You only need amxmodx.inc, and you probably want to look at the plugin posting guidelines
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 07-02-2004 , 00:09  
Reply With Quote #5

BUG REPORT!

The "normal" color isnt exactly normal but is REALLY close on CS 1.6
__________________

BigBaller is offline
Mr. Satan
Senior Member
Join Date: Apr 2004
Location: Fort Wayne, Indiana
Old 07-02-2004 , 01:22  
Reply With Quote #6

Well, the color value for default was taken straight from Half-Life.
__________________
DITN's TEAMSPEAK Server @ ditn.sytes.net:8767
Mr. Satan is offline
Send a message via AIM to Mr. Satan Send a message via MSN to Mr. Satan Send a message via Yahoo to Mr. Satan
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 07-02-2004 , 06:43  
Reply With Quote #7

the color code for default, what is closer anyways is

con_color 255+174+20

soo thier you go.
__________________

BigBaller is offline
BOOM
Member
Join Date: Jun 2004
Old 07-10-2004 , 06:57  
Reply With Quote #8

This Nice i rated 3 and put Interesting
BOOM is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 07-10-2004 , 21:31  
Reply With Quote #9

You have to a) remove the <amxmod> include

You dont have to post the source in the thread, attaching it is enough
And you dont have to put a name in the title unless you port a plugin which isnt yours
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
BOOM
Member
Join Date: Jun 2004
Old 02-08-2005 , 00:26  
Reply With Quote #10

Quote:
Originally Posted by Mr. Satan
Well, the color value for default was taken straight from Half-Life.
yea still a bug in this plugin, you gonna change this or what?

Quote:
Originally Posted by devicenull
You have to a) remove the <amxmod> include

You dont have to post the source in the thread, attaching it is enough
And you dont have to put a name in the title unless you port a plugin which isnt yours
BOOM 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 02:35.


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