Raised This Month: $ Target: $400
 0% 

SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 03-27-2014 , 08:29   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #1

Quote:
Originally Posted by Ellie View Post
Been using this with TF2 and out of the 12 color tags, {O} and {GRA} don't work at all. Orange always comes out the default color for me (it doesn't even give me the alternate color which is suppose to be green). I'm thinking that color chart above is wrong about having orange available for TF2 because in colors.inc it doesn't mention orange in TF2 at all (which you can see in this image). The color gray doesn't work for me even if someone is on the spectator team. Anyone get gray working with this in TF2? Also tried this with L4D2 and all the 11 color tags mentioned in your chart for L4D2 work fine. But oddly enough the {GRA} tag works even if there isn't anyone on the spectator team. How can that be? I though team colors only worked if there was at least one person on the team. In L4D2s case, the blue color tags always work because there is always someone (or bot) on the blue team, which is not the case for the red and gray teams. But gray works even when I was the only person on the server and I was on the blue team. Maybe what is done with L4D2 gray tag can be done for all colors for all games?
It could be that an update removed the colors again. I assume the colors worked back then when I created the color table. The gray color is is defined as ChatColorSubjectType_undefined in the code, which resolves to -1, so a team player in spectator team is not needed in this case.

Basic RGB custom color support has been added already (there is no release-version of this yet) in the GIT master branch.
The following tag annotations work for RGB already in the master-branch-code:
  • {#RGB}
  • {#RRGGBB}
  • {#RGBA}
  • {#RRGGBBAA}

Named RGB colors have not been implemented yet, you can follow the status in this issue: https://github.com/bcserv/smlib/issues/10

Quote:
Originally Posted by friagram View Post
You need to start with a tag and then use another in some cases.
You normally don't have to add start tags, as smlib should handle this automatically.
__________________
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
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-27-2014 , 16:36   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #2

Quote:
Originally Posted by Ellie View Post
Been using this with TF2 and out of the 12 color tags, {O} and {GRA} don't work at all. Orange always comes out the default color for me (it doesn't even give me the alternate color which is suppose to be green). I'm thinking that color chart above is wrong about having orange available for TF2 because in colors.inc it doesn't mention orange in TF2 at all (which you can see in this image). The color gray doesn't work for me even if someone is on the spectator team. Anyone get gray working with this in TF2? Also tried this with L4D2 and all the 11 color tags mentioned in your chart for L4D2 work fine. But oddly enough the {GRA} tag works even if there isn't anyone on the spectator team. How can that be? I though team colors only worked if there was at least one person on the team. In L4D2s case, the blue color tags always work because there is always someone (or bot) on the blue team, which is not the case for the red and gray teams. But gray works even when I was the only person on the server and I was on the blue team. Maybe what is done with L4D2 gray tag can be done for all colors for all games?
Stop using the colors.inc or smlib.inc for your colors and start using Dr. McKay's More Colors include file. It uses the ability that TF2 has to use hex colors instead of those predefined colors from the original colors.inc. You also don't have to fuck around with the hex colorizing code posted above.

All you have to do is add "#include <morecolors>" in your plugins source code and switch over some functions, such as:

- Changing PrintToChat/PrintToChatAll/PrintToChatEx/PrintToChatAllEx over to CPrintToChat/CPrintToChatAll/CPrintToChatEx/CPrintToChatAllEx
- Changing ShowActivity/ShowActivity2/ShowActivityEx over to CShowActivity/CShowActivity2/CShowActivityEx
- Changing ReplyToCommand/ReplyToCommandEx to CReplyToCommand/CReplyToCommandEx

i.e:

PHP Code:
CPrintToChat(client"{unusual}[SM]{fullred}THIS IS A FULL RED MESSAGE"); 
That'll be displayed ingame as this:

[SM] THIS IS A FULL RED MESSAGE

Last edited by 404UserNotFound; 03-27-2014 at 16:40.
404UserNotFound is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 03-27-2014 , 18:26   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #3

@abrandnewday

Your lib only supports 4 games, how great :p Also there are people that don't like to download an include file for every shit but rather use a collection/framework.
smlib also supports RGB colors in the current master branch as already said, just not named definitions for them yet. Maybe you should read better than wildly posting any weird suggestions.

Edit: looking at morecolors code, it doesn't have a good performance, it's overusing ReplaceString.
__________________
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

Last edited by berni; 03-27-2014 at 18:30.
berni is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 03-28-2014 , 02:38   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #4

Quote:
Originally Posted by berni View Post
smlib also supports RGB colors in the current master branch as already said
He never said that it didn't?
__________________
ddhoward is offline
recon0
Veteran Member
Join Date: Sep 2007
Location: US
Old 01-24-2011 , 23:35   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #5

Very nice.
__________________
recon0 is offline
dirtyminuth
Senior Member
Join Date: Sep 2009
Old 01-25-2011 , 00:17   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #6

I should not be this excited about stocks!

Nice work and thanks for your efforts, already learning a lot just digging through the code!
__________________
dirtyminuth is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 01-25-2011 , 11:39   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #7

Gj, like it
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 01-25-2011 , 12:33   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #8

Nice work! No more need for my own little library You're the men!
__________________
Peace-Maker is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 01-25-2011 , 12:55   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #9

Thanks

If you guys need anything added, find a bug or have difficulties with something, just ask.
__________________
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
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 01-26-2011 , 02:29   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #10

1.
PHP Code:
stock (client,  const String:className[]); 
2. Its AWESOME
miniman 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 15:50.


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