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

[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-14-2012 , 07:06   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #11

Quote:
Originally Posted by Dr. McKay View Post
Known Issues:
  • CPrintToChatAllEx sometimes causes an "invalid client index" error
  • Needs a CRemoveTags stock
__________________
Dr. McKay is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 05-14-2012 , 23:17   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #12

McKay, any chance of adding support for {#FFFFFF} tags, as that one advertisements plugin already has? And even {##FFFFFFAA} for alpha as well using \x08?
__________________
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-14-2012 , 23:19   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #13

Quote:
Originally Posted by FlaminSarge View Post
McKay, any chance of adding support for {#FFFFFF} tags, as that one advertisements plugin already has? And even {##FFFFFFAA} for alpha as well using \x08?
Sure. I just don't really understand why wrapping {} around an RGB color code is easier than just typing out \x07RRGGBB...
__________________

Last edited by Dr. McKay; 05-14-2012 at 23:19.
Dr. McKay is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-15-2012 , 15:07   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #14

Thought this might come of use to some people:
PHP Code:
stock GetRandomRGB() {
    
SetRandomSeed(RoundFloat(GetEngineTime()));
    return (((
GetRandomInt(0,255) & 0xFF) << 16) | ((GetRandomInt(0,255) & 0xFF) << 8) | ((GetRandomInt(0,255) & 0xFF) << 0));

bl4nk is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 05-18-2012 , 22:23   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #15

bl4nk, wouldn't it be easier to just use GetRandomInt(0, MAXSIZE) and set the alpha bits to 0xFF ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-20-2012 , 01:59   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #16

Quote:
Originally Posted by FlaminSarge View Post
McKay, any chance of adding support for {#FFFFFF} tags, as that one advertisements plugin already has? And even {##FFFFFFAA} for alpha as well using \x08?
My code found here should do it relatively quickly and safely should you want to copy it McKay.
__________________

Last edited by 11530; 05-20-2012 at 01:59.
11530 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-22-2012 , 02:15   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #17

Quote:
Originally Posted by berni View Post
bl4nk, wouldn't it be easier to just use GetRandomInt(0, MAXSIZE) and set the alpha bits to 0xFF ?
I suppose that would work as well.
bl4nk is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-22-2012 , 16:33   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #18

Quote:
Originally Posted by berni View Post
bl4nk, wouldn't it be easier to just use GetRandomInt(0, MAXSIZE) and set the alpha bits to 0xFF ?
Why would the alpha bits be necessary? There's a reason Valve included two versions of the colored code... so you only had to set the alpha if you wanted transparency.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 05-22-2012 , 17:45   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #19

sure, but you don't want to have random transparency, do you ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 05-22-2012 , 19:08   Re: [INC] More Colors (1.0.0BETA)
Reply With Quote #20

Quote:
Originally Posted by berni View Post
sure, but you don't want to have random transparency, do you ?
Text is fully opaque if you use \x07. Alpha is only present if you use \x08.
__________________

Last edited by Dr. McKay; 05-22-2012 at 19:08.
Dr. McKay 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:35.


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