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

[INC] More Colors (1.9.1)


Post New Thread Reply   
 
Thread Tools Display Modes
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 09-24-2014 , 19:20   Re: [INC] More Colors (1.9.1)
Reply With Quote #411

Quote:
Originally Posted by Powerlord View Post
You realize that's a local variable and isn't visible outside CSendMessage, right?
~/SOURCEMOD_ALL_FILES/sourcemod/git_War3Evo_VenumX_19FEB2014/tf/addons/sourcemod/scripting/include/morecolors.inc(153) : warning 219: local variable "game" shadows a variable at a preceding level
__________________

Last edited by El Diablo War3Evo; 09-24-2014 at 19:23.
El Diablo War3Evo is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 09-24-2014 , 23:29   Re: [INC] More Colors (1.9.1)
Reply With Quote #412

Quote:
Originally Posted by El Diablo War3Evo View Post
Just a request. I already modified it locally, and I guess I could just use SmartSynchronize to compare and make changes if you feel this request is not acceptable.

I am sure you can guess that some plugin wants to create a global variable called "game", and that variable is everywhere in that plugin compared to your plugin, and it would be so much easier to just change your code instead. That is why I requested its change. I requested it on a idea that there might be a very slim chance you might change it to help another plugin developer not have to remember to change your morecolors.inc plugin code for every update that happens to it.
Orrrrrr you could use sane naming conventions like g_Game for your global variables. Or perhaps you could even name your variable sGame and not require changes to third-party code.
__________________

Last edited by Dr. McKay; 09-24-2014 at 23:29.
Dr. McKay is offline
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 09-25-2014 , 10:55   Re: [INC] More Colors (1.9.1)
Reply With Quote #413

Dr. McKay, just wanted to know if you would do it or not.

Thank you for your time.
__________________

Last edited by El Diablo War3Evo; 09-25-2014 at 10:56.
El Diablo War3Evo is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 09-25-2014 , 11:02   Re: [INC] More Colors (1.9.1)
Reply With Quote #414

Changing it to sGame would cause an issue with one of MY plugins where I have a variable named sGame. If your problem is fixed, it would cause problems for me. You are not more important than I, nor vice versa.

The obvious solution is to just pick a different variable name yourself, as has already been suggested.
__________________
ddhoward is offline
nikooo777
AlliedModders Donor
Join Date: Apr 2010
Location: Lugano, Switzerland
Old 09-30-2014 , 16:58   Re: [INC] More Colors (1.9.1)
Reply With Quote #415

So,
I couldn't find a CSGO version of this due to the fact that CSGO only supports some colors.
I did some research and found that colors from x01 to x10 work, therefore i edited the colors.inc to make it work for csgo with those new colors.

There is a little problem, I am colorblind so I can't really figure out what some colors are, nor am I sure for some of those I wrote. I'd appreciate if somebody had a look at them and fixes the tags and eventually the other Print functions.

I know this is not a clean include at all, however it's better than nothing and i use it in advertisements.smx for printing in chat.

here is what i came up with.
Credits to
Quote:
Author: exvel, Editor: Popoklopsi, Powerlord, Bara
BTW, don't use it for any other game other than CSGO... you don't want to break them.

Code:
enum Colors
{
	Color_Default = 0,
	Color_Darkred,
	Color_Pink,
	Color_Green,
	Color_Lightgreen,
	Color_Lime,
	Color_Red,
	Color_Grey,
	Color_Olive,
	Color_A,
	Color_Lightblue,
	Color_Blue,
	Color_D,
	Color_Purple,
	Color_Darkrange,
	Color_Orange
}
Code:
CPrintToChatAll("{default}test{darkred}test{pink}test{green}test{lightgreen}test{lime}test{red}test{grey}test{olive}test{a}test{lightblue}test{blue}test{d}test{purple}test{darkorange}test{orange}test");


use this as reference to the HEX codes:
Attached Files
File Type: inc colors_csgo.inc (15.5 KB, 1708 views)
__________________

Last edited by nikooo777; 09-30-2014 at 16:59.
nikooo777 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-30-2014 , 17:06   Re: [INC] More Colors (1.9.1)
Reply With Quote #416

Quote:
Originally Posted by nikooo777 View Post
So,
I couldn't find a CSGO version of this due to the fact that CSGO only supports some colors.
I did some research and found that colors from x01 to x10 work, therefore i edited the colors.inc to make it work for csgo with those new colors.

There is a little problem, I am colorblind so I can't really figure out what some colors are, nor am I sure for some of those I wrote. I'd appreciate if somebody had a look at them and fixes the tags and eventually the other Print functions.

I know this is not a clean include at all, however it's better than nothing and i use it in advertisements.smx for printing in chat.

here is what i came up with.
Credits to


BTW, don't use it for any other game other than CSGO... you don't want to break them.

Code:
enum Colors
{
	Color_Default = 0,
	Color_Darkred,
	Color_Pink,
	Color_Green,
	Color_Lightgreen,
	Color_Lime,
	Color_Red,
	Color_Grey,
	Color_Olive,
	Color_A,
	Color_Lightblue,
	Color_Blue,
	Color_D,
	Color_Purple,
	Color_Darkrange,
	Color_Orange
}
Code:
CPrintToChatAll("{default}test{darkred}test{pink}test{green}test{lightgreen}test{lime}test{red}test{grey}test{olive}test{a}test{lightblue}test{blue}test{d}test{purple}test{darkorange}test{orange}test");


use this as reference to the HEX codes:
This is the MoreColors thread, the Colors thread is over there.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
nikooo777
AlliedModders Donor
Join Date: Apr 2010
Location: Lugano, Switzerland
Old 09-30-2014 , 18:20   Re: [INC] More Colors (1.9.1)
Reply With Quote #417

yeah but it's unsupported and points here. Thought it might be a good addition to the thread.
My apologies if not.
__________________
nikooo777 is offline
Markassa
New Member
Join Date: Nov 2014
Old 11-26-2014 , 22:37   Re: [INC] More Colors (1.9.1)
Reply With Quote #418

hello, sorry for ressuciting this old thread (i think)..

i need help because im a newbie on this plugin stuff and i dont have any idea how i can "install" this plugin, should i just throw it on addon/sourcemod/plugin ? my friend told me to do this but i dont think this is right because all the stuff inside this page is .smx and your one is .inc

can you help me?
im sorry for my newbieness
Markassa is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 11-27-2014 , 03:14   Re: [INC] More Colors (1.9.1)
Reply With Quote #419

Quote:
Originally Posted by Markassa View Post
hello, sorry for ressuciting this old thread (i think)..

i need help because im a newbie on this plugin stuff and i dont have any idea how i can "install" this plugin, should i just throw it on addon/sourcemod/plugin ? my friend told me to do this but i dont think this is right because all the stuff inside this page is .smx and your one is .inc

can you help me?
im sorry for my newbieness
This is not a plugin. This is code that you put into OTHER plugins when you create the SMX.

Unless you are creating a plugin, you do not need morecolors.inc.
__________________
ddhoward is offline
Markassa
New Member
Join Date: Nov 2014
Old 11-27-2014 , 11:28   Re: [INC] More Colors (1.9.1)
Reply With Quote #420

aaaaah, but i got here because i was trying to instal unusual effects and this is one of the requeriments... but how do i use it to make unusual effects work?
Markassa 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 22:09.


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