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

[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 01-12-2013 , 14:05   Re: [INC] More Colors (1.6.2)
Reply With Quote #141

Quote:
Originally Posted by asherkin View Post
The network limit is 255, and 2 bytes are used for the data that isn't the string itself.

Also, while I don't have the pre-regex one for comparison, regex is generally not a good tool for applications like like - lexing the string per-character would probably give the best results.
Here's the pre-regex one. How is regex not a good tool for this?
__________________
Dr. McKay is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-23-2013 , 18:33   Re: [INC] More Colors (1.6.2)
Reply With Quote #142

I have updated morecolors.inc to 1.7.0 to support CS:GO. However, I don't trust it enough yet. It would be great if some people could test it for me before I commit it to be final.

Link: https://bitbucket.org/Doctor_McKay/p...morecolors.inc

This update also changed the way team colors are handled in DoD:S. If there are other Source games that don't have SayText2, their team colors can be added easily.

Edit: link is now 1.7.1. 1.7.1 adds feature status checking.

Double edit: link is now 1.7.2, which removes CS:GO support.
__________________

Last edited by Dr. McKay; 01-27-2013 at 15:43.
Dr. McKay is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-24-2013 , 10:12   Re: [INC] More Colors (1.6.2)
Reply With Quote #143

{teamcolor} wont be stripped again in DoD:S
it is not support \x03 color code.
Also you'd say that this required latest include files from snapshots 3747+, otherwise plugin that compiled against 1.7.0 morecolors with older binaries can throw an error
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-24-2013 , 10:20   Re: [INC] More Colors (1.6.2)
Reply With Quote #144

Quote:
Originally Posted by Root_ View Post
Also you'd say that this required latest include files from snapshots 3747+, otherwise plugin that compiled against 1.7.0 morecolors with older binaries can throw an error
Code:
if(GetUserMessageType() == UM_Protobuf) {
Code:
if(GetFeatureStatus(FeatureType_Native, "GetUserMessageType") == FeatureStatus_Available && GetUserMessageType() == UM_Protobuf) {
Technically should also check CanTestFeatures, but feature testing has been around since 1.3.

EDIT: If you want full backwards compatibility, GetUserMessageType also needs to be marked as optional in AskPluginLoad2.
__________________

Last edited by asherkin; 01-24-2013 at 12:42.
asherkin is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-24-2013 , 10:21   Re: [INC] More Colors (1.6.2)
Reply With Quote #145

Quote:
Originally Posted by Root_ View Post
{teamcolor} wont be stripped again in DoD:S
it is not support \x03 color code.
Also you'd say that this required latest include files from snapshots 3747+, otherwise plugin that compiled against 1.7.0 morecolors with older binaries can throw an error
If it's DoD:S, it will later replace the \x03 with the proper team color. Believe it or not, DoD:S is the one game I actually did test this in.
__________________

Last edited by Dr. McKay; 01-24-2013 at 10:27.
Dr. McKay is offline
ph
AlliedModders Donor
Join Date: Mar 2006
Old 01-25-2013 , 10:51   Re: [INC] More Colors (1.6.2)
Reply With Quote #146

Can you help me out here please. / Using latest dev build for CS:GO support.

What is the color code highlighted in bold, that needs to be inserted for it to work properly.


Quote:
{
"en" "{RED}"
}
__________________

Last edited by ph; 01-25-2013 at 16:58.
ph is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-25-2013 , 11:01   Re: [INC] More Colors (1.6.2)
Reply With Quote #147

Quote:
Originally Posted by ph View Post
Can you help me out here please. / Using latest dev build for CS:GO support.

What is the color code highlighted in bold, that needs to be inserted for it to work properly.
I wasn't really aware that CS:GO didn't support hex colors. Someone should just update the original colors to support protobuf messages. I might do it later if I find the time.
__________________
Dr. McKay is offline
altex
Veteran Member
Join Date: May 2009
Location: Russia
Old 01-26-2013 , 07:35   Re: [INC] More Colors (1.6.2)
Reply With Quote #148

Quote:
Originally Posted by Dr. McKay View Post
I have updated morecolors.inc to 1.7.0 to support CS:GO. However, I don't trust it enough yet. It would be great if some people could test it for me before I commit it to be final.

Link: https://bitbucket.org/Doctor_McKay/p...morecolors.inc

This update also changed the way team colors are handled in DoD:S. If there are other Source games that don't have SayText2, their team colors can be added easily.

Edit: link is now 1.7.1. 1.7.1 adds feature status checking.
It does not work for csgo

For example this plugin

Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <cstrike>

#include <morecolors>

public Plugin:myinfo = {
    name = "Test colors",
    author = "Altex",
    description = "Test colors",
    version = "1.0",
    url = ""
};

public OnPluginStart() {
    RegConsoleCmd("test", TestCmd, "Test");
}

public Action:TestCmd(client, args) {
    CPrintToChatAll("test {green}green {red}red {blue}blue {orange}orange");
    return Plugin_Handled;
}
will produce the following output

Attached Thumbnails
Click image for larger version

Name:	test1.jpg
Views:	2450
Size:	20.5 KB
ID:	115067  
__________________
altex is offline
dordnung
Veteran Member
Join Date: Apr 2010
Old 01-26-2013 , 07:49   Re: [INC] More Colors (1.6.2)
Reply With Quote #149

Yes, CS:GO doesn't support hex colors
__________________

Last edited by dordnung; 01-26-2013 at 07:50.
dordnung is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-27-2013 , 15:43   Re: [INC] More Colors (1.6.2)
Reply With Quote #150

The 1.7 beta has been updated to 1.7.2. This update removes CS:GO support. If you want to use colors in CS:GO, this version of colors.inc should work.
__________________
Dr. McKay 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 08:06.


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