Raised This Month: $32 Target: $400
 8% 

[INC] More Colors (1.9.1)


Post New Thread Reply   
 
Thread Tools Display Modes
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-28-2012 , 15:51   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #31

Quote:
Originally Posted by asherkin View Post
Just use GetTrieString and check it doesn't return false. It's whole point is that it's a Trie so lookups are fast, iterating the whole list would be stupidly slow.
I did this in the .inc in the OP.
__________________
Dr. McKay is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-28-2012 , 16:36   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #32

Alright, I've updated it to 1.1.0. It's still in beta, but it now has a CRemoveTags stock. I've also fixed the bug with CPrintToChatAllEx.

Here's a full changelog:
  • Fixed bug in CPrintToChatAllEx
  • Added StrToLower documentation
  • Added CRemoveTags
  • Added CGetTeamColor stock, which returns the hexadecimal representation of a client's team color (without initializing the trie)
__________________
Dr. McKay is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-29-2012 , 00:07   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #33

These may already be included in the list (since I don't know their hex values) but what would you think of adding item-type colors, such as Unusual, Strange, Genuine, Vintage etc. (swatch here) as well as the various single-tone paints in the game?
__________________
11530 is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-29-2012 , 02:02   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #34

Quote:
Originally Posted by 11530 View Post
These may already be included in the list (since I don't know their hex values) but what would you think of adding item-type colors, such as Unusual, Strange, Genuine, Vintage etc. (swatch here) as well as the various single-tone paints in the game?
Not a bad idea.
__________________
Dr. McKay is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-29-2012 , 05:02   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #35

From ClientScheme.res:
Code:
        "QualityColorNormal"                    "178 178 178 255"
        "QualityColorrarity1"                    "77 116 85 255"
        "QualityColorrarity2"                    "141 131 75 255"
        "QualityColorrarity3"                    "112 85 15 255"
        "QualityColorrarity4"                    "134 80 172 255"
        "QualityColorVintage"                    "71 98 145 255"
        "QualityColorUnique"                    "255 215 0 255"
        "QualityColorCommunity"                    "112 176 74 255"
        "QualityColorDeveloper"                    "165 15 121 255"
        "QualityColorSelfMade"                    "112 176 74 255"
        "QualityColorCustomized"                "71 98 145 255"
        "QualityColorStrange"                    "207 106 50 255"
        "QualityColorCompleted"                    "134 80 172 255"
        "QualityColorHaunted"                    "134 80 172 255"
(Of course, custom ClientScheme.res files can change these, so you'll only have the default ones defined)

There's a lot more colors defined in ClientScheme, so take a look.
Of interesting note:
Code:
        //"Black"                "0 0 0 255"
        //Changed black to a NTSC safe color
        
        "Black"                "46 43 42 255"
Also, you didn't use any of my typo/spacing fixes :C
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 05-29-2012 at 05:08.
FlaminSarge is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-29-2012 , 06:39   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #36

Thanks for the ClientScheme.res tip, I was just going to use the colors from the wiki.
Quote:
Originally Posted by FlaminSarge View Post
Also, you didn't use any of my typo/spacing fixes :C
Where were those?
__________________
Dr. McKay is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-30-2012 , 01:40   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #37

Mostly in the documentation. Do a diff with the morecolors.inc I posted a few posts up, you'll see 'em.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.
FlaminSarge is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-31-2012 , 19:05   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #38

I've added a lite version, morecolorslite.inc.

It only has one stock:

PHP Code:
/** 
 * Returns the hexadecimal representation of a client's team color (will NOT initialize the trie, so if you use only this function from this include file, your plugin's memory usage will not increase) 
 * 
 * @param client        Client to get the team color for 
 * @return                Client's team color in hexadecimal, or green if unknown 
 * On error/Errors:        If the client index passed is invalid or not in game. 
 */ 
stock CGetTeamColor(client
Pretty much the only stock I'm ever going to use, since the rest of the .inc simply attaches names to colors. This just gives me a client's team color simply and easily, without all the extra baggage.

Note: If you include morecolors.inc and only use CGetTeamColor, it'll be basically the same since none of the other stocks will be compiled into the plugin, and the trie will never be initialized.
__________________
Dr. McKay is offline
Razmo51
Senior Member
Join Date: Aug 2011
Location: Event "player_death
Old 06-04-2012 , 17:12   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #39

very nice; I'm in love with this include *.*
__________________
Sorry for my bad English, I'm Belgian

Last edited by Razmo51; 06-04-2012 at 17:12.
Razmo51 is offline
AeroAcrobat
AlliedModders Donor
Join Date: Apr 2011
Location: lives in a circus
Old 06-22-2012 , 18:26   Re: [INC] More Colors (1.1.0BETA)
Reply With Quote #40

Chat colors [PSD] v3.0

Bored of edit the color -> reloading -> edit again...
Those days are over now!


Get instant feedback in Adobe Photoshop.





Download the PSD file:
- click here -

Looking for color combinations ?
https://kuler.adobe.com
http://colourlovers.com/palettes/mos...ites/all-time/
__________________

Last edited by AeroAcrobat; 04-16-2013 at 08:54.
AeroAcrobat 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 00:21.


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