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
Ellie
Senior Member
Join Date: Apr 2013
Old 09-10-2013 , 10:01   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #331

Quote:
Originally Posted by berni View Post
You can use only one subject/team color per message. If you have already used another subject color like shown in this table, you can't use a teamcolor. It could also fail if the color is not supported, which game ?

Yes, I made sure not to use more than one team color per print message, but they still come out green instead or blue/red/lightgreen. The game is left 4 dead. And, I finally finished adding colors to that stats plugin (over 160 print messages), it works perfectly. I just thought it wouldn't work because many fuctions started differently than any other plugin I've used so far (such as StatsPrintToChat2). Thanks
Ellie is offline
Docacac
New Member
Join Date: Nov 2013
Old 11-06-2013 , 13:49   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #332

I know I'm going to sound like a complete idiot when I say this but, what do you mean by adding #include <smlib> in the top of my plugins folder? I have searched as much as I can but I don't understand it.
Docacac is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 11-06-2013 , 13:59   Re: Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #333

Quote:
Originally Posted by Docacac View Post
I know I'm going to sound like a complete idiot when I say this but, what do you mean by adding #include <smlib> in the top of my plugins folder? I have searched as much as I can but I don't understand it.
You put the text "#include <smlib>" at the top of the plugin you are writing. You must also move the smlib includes to your includes folder in your scripting folder. These are two different steps.
__________________
ddhoward is offline
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 01-22-2014 , 00:38   Re: SMLIB 0.11 BETA (over 300 Function Stocks) | updated 15.07.2011
Reply With Quote #334

Good, I are new on this, this is very good for newbie users(me), thanks!
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
Ellie
Senior Member
Join Date: Apr 2013
Old 03-15-2014 , 02:58   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #335

Quote:
Originally Posted by berni 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?

Last edited by Ellie; 03-15-2014 at 03:19.
Ellie is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 03-16-2014 , 10:51   Re: SMLIB 0.9 BETA (266 Function Stocks)
Reply With Quote #336

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?
You need to start with a tag and then use another in some cases.
For tf2, just use hex directly in print to chat, and don't use this at all. You get more colors that way anyways.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
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 #337

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 #338

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 #339

@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 #340

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
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 21:59.


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