Raised This Month: $32 Target: $400
 8% 

[INC] More Colors (1.9.1)


Post New Thread Reply   
 
Thread Tools Display Modes
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 04-01-2014 , 17:51   Re: [INC] More Colors (1.9.1)
Reply With Quote #371

Quote:
Originally Posted by Dr. McKay View Post
It's most likely just you.
What could be the cause of a single colour just all of a sudden not working?
Can you/anyone else confirm or deny whether {ANCIENT} is no longer working?
SephirothSG is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 04-01-2014 , 18:45   Re: [INC] More Colors (1.9.1)
Reply With Quote #372

Quote:
Originally Posted by SephirothSG View Post
What could be the cause of a single colour just all of a sudden not working?
Can you/anyone else confirm or deny whether {ANCIENT} is no longer working?
__________________
11530 is offline
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 04-01-2014 , 18:56   Re: [INC] More Colors (1.9.1)
Reply With Quote #373

Quote:
Originally Posted by 11530 View Post
Well then, it's time for me to go cry in a corner
You wouldn't happen to have any idea as to why Ancient is the only colour I'm having issues with would you? I've changed nothing since I had it working perfectly 2 days ago.

Last edited by SephirothSG; 04-01-2014 at 19:20.
SephirothSG is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 04-02-2014 , 16:39   Re: [INC] More Colors (1.9.1)
Reply With Quote #374

Quote:
Originally Posted by SephirothSG View Post
Well then, it's time for me to go cry in a corner
You wouldn't happen to have any idea as to why Ancient is the only colour I'm having issues with would you? I've changed nothing since I had it working perfectly 2 days ago.
The two most common answers to this would be:
  • You spelled "Ancient" incorrectly.
  • You aren't using the appropriate More Colors stock, e.g. CPrintToChat, instead of PrintToChat.

Would you mind posting the line in question, and any extra relevant code?
__________________
11530 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-02-2014 , 17:17   Re: [INC] More Colors (1.9.1)
Reply With Quote #375

Since morecolors.inc's CShowActivity, CShowActivityEx, and CShowActivity2 don't properly work with %t translations (they translate everything to the server language due to the Format with no SetGlobalTransTarget first), I ported the code I did for those over in colors.inc to morecolors.inc. Since it just makes calls to CPrintToChatEx and CRemoveTags/PrintToConsole instead of doing its own work, the code is basically identical between colors.inc and morecolors.inc.

Be aware that these do have some heft to them, though... they're each about 3k a piece in terms of code size and my test plugin to make sure they work is also about 12k for all 3.
Attached Files
File Type: inc morecolors.inc (30.7 KB, 80 views)
File Type: sp Get Plugin or Get Source (colors-tester.sp - 74 views - 2.8 KB)
File Type: smx colors-tester.smx (11.6 KB, 75 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-02-2014 at 17:23.
Powerlord is offline
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 04-02-2014 , 22:55   Re: [INC] More Colors (1.9.1)
Reply With Quote #376

Quote:
Originally Posted by 11530 View Post
The two most common answers to this would be:
  • You spelled "Ancient" incorrectly.
  • You aren't using the appropriate More Colors stock, e.g. CPrintToChat, instead of PrintToChat.

Would you mind posting the line in question, and any extra relevant code?
Here ya go, I don't see any issues with my spelling (unless I'm going completely blind) the message is being displayed as
[TAG]{ANCIENT} Number of clients below threshold. Enabling Alltalk!
Ancient doesn't seem to be being rendered at all, yes I've even tried it on it's own and it still refuses to work.
PHP Code:
#include <sourcemod>
#include <morecolors>
#pragma semicolon 1
#define PLUGIN_VERSION "1.0"

public Plugin:myinfo =
{
    
name "I do things",
    
author "Sephiroth",
    
description "I check things",
    
version PLUGIN_VERSION,
    
url ""
};

new 
Handle:g_Alltalk INVALID_HANDLE;

public 
OnPluginStart()
{
    
g_Alltalk FindConVar("sv_alltalk");
    
HookConVarChange(g_AlltalkOnConVarChange);

/*    new flags, Handle:cvar = FindConVar("sv_tags");

    flags = GetConVarFlags(cvar);
    flags &= ~FCVAR_NOTIFY;
    SetConVarFlags(cvar, flags);

    CloseHandle(cvar);
*/
}

public 
OnConVarChange(Handle:convar, const String:oldValue[], const String:newValue[])
{
    if (
strcmp(oldValuenewValue) != 0)
    {
        if (
strcmp(newValue"1") == 0)
            
CPrintToChatAll("{ROYALBLUE}[TAG]{ANCIENT} Number of clients below threshold. Enabling Alltalk!");
        else
            
CPrintToChatAll("{ROYALBLUE}[TAG]{ANCIENT} Number of clients above threshold. Disabling Alltalk!");
    }


Last edited by SephirothSG; 04-02-2014 at 22:56.
SephirothSG is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 04-03-2014 , 09:18   Re: [INC] More Colors (1.9.1)
Reply With Quote #377

Have you made sure that the version of the include you're compiling with even has ANCIENT in it?
bl4nk is offline
VACguy
New Member
Join Date: Apr 2014
Old 04-03-2014 , 16:46   Re: [INC] More Colors (1.9.1)
Reply With Quote #378

Can some say how i install this

Last edited by VACguy; 04-03-2014 at 16:47.
VACguy is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 04-03-2014 , 16:47   Re: [INC] More Colors (1.9.1)
Reply With Quote #379

You download it, put it in your include folder, then #include <morecolors> in whatever plugin you are creating that you want to utilize the colors.

Also, please do not double post. This is a rather slow moving forum at times; posting multiple times isn't going to bring attention to your question any faster.
__________________

Last edited by ddhoward; 04-03-2014 at 16:48.
ddhoward is offline
SephirothSG
SourceMod Donor
Join Date: Jun 2013
Old 04-03-2014 , 18:01   Re: [INC] More Colors (1.9.1)
Reply With Quote #380

Quote:
Originally Posted by bl4nk View Post
Have you made sure that the version of the include you're compiling with even has ANCIENT in it?
Yes, it is the latest version of the include. I decided on using AXIS now anyway.
Ignore all prior posts regarding my issue.

Last edited by SephirothSG; 04-03-2014 at 18:04.
SephirothSG 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 08:24.


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