AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] Colors (1.0.5) (https://forums.alliedmods.net/showthread.php?t=96831)

exvel 09-10-2009 08:57

Re: [INC] Colors (1.0.1)
 
well, there were a lot of threads about this in Scripting forum

BeG 09-28-2009 08:12

Re: [INC] Colors (1.0.1)
 
dont work for me.... i dont know why i have made all correctly but it dont work... but why? .... sourcemod 1.2.3???

works with the newest stable version?

exvel 09-29-2009 09:01

Re: [INC] Colors (1.0.1)
 
What did you exactly do? Show your code and errors.

BeG 09-29-2009 09:40

Re: [INC] Colors (1.0.1)
 
i have edited the sourcecode from the plugin with the inlude ant then recomplied then i have in the translationfile added {green} in the text but dont work errors i dont have i have reinstalled the server because i made a new config =)

BeG

exvel 09-29-2009 15:40

Re: [INC] Colors (1.0.1)
 
Sorry, I don't understand. :) Just show your code and translation file. Not all, only parts with colors.
Also, did you placed colors.inc in the sourcemod\scripting\include folder?

BeG 09-29-2009 17:46

Re: [INC] Colors (1.0.1)
 
yap i have... can you not only test if it runs on your sm 1.2.3. ?

exvel 09-30-2009 07:20

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by BeG (Post 947303)
yap i have... can you not only test if it runs on your sm 1.2.3. ?

It works on SM 1.1.0 and higher versions.

spunkster21 10-17-2009 19:13

Re: [INC] Colors (1.0.1)
 
Hi, first off very nice work with this includes.

I've read your FAQ and I understand you can't use more than one team colour at a time, but I was wondering if there is any way to use {green} and {lightgreen} in CS:Source at the same time like you can when using \x04 and \x03 using normal PrintToChat and PrintToChatAll?

Sorry if I'm being dumb, it's late and I'm new to SourcePawn.

Thanks.

exvel 10-18-2009 06:20

Re: [INC] Colors (1.0.1)
 
{green} isn't a team color so you can use it with {lightgreen}

spunkster21 10-18-2009 14:52

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by exvel (Post 965766)
{green} isn't a team color so you can use it with {lightgreen}

Sorry, I missed a vital piece of information from my previous post. Essentially I've written a simple plugin which changes the chat colour of my clan members. When I print their text to the chat area I also use the team colour (red or blue) to indicate if they are a T or CT.

So I'm using three colours in total; red, lightgreen and green. It's the lightgreen and red that are conflicting.

DJ Tsunami 10-18-2009 17:53

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by exvel (Post 868236)
Notes:
  • You can use only one team color (like lightgreen, red or blue) in the message.


spunkster21 10-18-2009 18:44

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by DJ Tsunami (Post 966404)
[/list]

Yeah I saw that. What team uses lightgreen as a team colour?

DJ Tsunami 10-18-2009 18:55

Re: [INC] Colors (1.0.1)
 
None actually, but lightgreen and team colors (grey, red or blue, depending on what team the player it originates from is on) share the same color code, but are sent using two different user messages, so you can't use both in one message.

spunkster21 10-18-2009 19:12

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by DJ Tsunami (Post 966447)
None actually, but lightgreen and team colors (grey, red or blue, depending on what team the player it originates from is on) share the same color code, but are sent using two different user messages, so you can't use both in one message.

Ah I see. Oh well I guess no lightgreen for me then. Thanks for explaining.

Fightspit 11-06-2009 06:48

Re: [INC] Colors (1.0.1)
 
Hello !
I just want to know if it is possible to put the tags ({green}, {red} ...) in a string and display it to the client with CPrintToChat ?

For example:

Code:

Format(string, sizeof(string), "The number {red}%d{default} is red.", number);
CPrintToChat(client, "%s", string);

The client receive (if number = 42):
The number 42 is red.

Is it possible ?

exvel 11-06-2009 12:11

Re: [INC] Colors (1.0.1)
 
yes, sure

Cerise 11-07-2009 09:01

Re: [INC] Colors (1.0.1)
 
Do you think there will be an update to make it work again for TF2 ?

Very nice work ( used it for CS:S ), works great.

exvel 11-07-2009 11:46

Re: [INC] Colors (1.0.1)
 
yeap, I'll make an update

leiftiger 11-22-2009 11:14

Re: [INC] Colors (1.0.1)
 
What colors are avaible in l4d2? Olive is yellow/orange now :/

mrj 11-29-2009 12:11

Re: [INC] Colors (1.0.1)
 
Hi, i replace ShowActivity to CPrintToChatAll, dont work, in chat i see {red}text but no text

Cerise 11-29-2009 14:24

Re: [INC] Colors (1.0.1)
 
Colors.inc (1.0.1) is a bit outdated for now since 3 or 4 steam updates afaik.

There're troubles in TF2 with the 'yellow' color and L4D2 doesnt really support this file.

After few tests, everything except 'default' ( white/grey ) turn into orange.

Could be 'easily' updated for TF2, but as L4D2 seems to not recognises strings like "\x0*", colors are f*cked up for now.

I'm already looking for a way to make a kind of update for my TF2 Servers ( Main game ) but i dunno how it's working in L4D2 for now =/

AtomicStryker 11-29-2009 15:25

Re: [INC] Colors (1.0.1)
 
Those are the three working in L4D2.

http://www.abload.de/img/l4d2colorsgdbk.jpg

\x01 - default (beige)
\x03 - turquoise
\x04 - orange
\x05 - olive

exvel 11-29-2009 17:07

Re: [INC] Colors (1.0.1)
 
They are the same as in L4D1/ Just edit profile section in the .inc.

exvel 12-01-2009 11:00

Re: [INC] Colors (1.0.1)
 
Hi guys. Need a reply from you. Just trying to figure out what troubles do you have in TF2 with colors. Just tested it and it works fine without any changes. There were some posts about colors not working after TF update. But it works for me. What exactly doesn't work?

p.s.
just tested:
PHP Code:

CPrintToChatAll("default {green}green {blue}blue {olive}olive"); 

screenshot:
[IMG]http://img694.**************/img694/2747/tfcolorstest1.png[/IMG]

Cerise 12-04-2009 04:35

Re: [INC] Colors (1.0.1)
 
Hi exvel,

Current issue in TF2 is the 'yellow' color.

I heard that some players got black instead of yellow until they see a item event "Someone has found : Ghastly Pingas"


AFAIK, i had Green working and yellow appearing as green. Never got black and never saw yellow even after an item event.

Like :

{YELLOW}Hellow gives Hellow

Other colors are working great to me, anyway, great job :up:

exvel 12-04-2009 08:47

Re: [INC] Colors (1.0.1)
 
Well, then I'll just do a research.
Currently {yellow} is an alias for {green}. It was made for L4D. Green code is yellow in this game.
Yellow color for TF currently is not implemented.

mrj 12-05-2009 04:14

Re: [INC] Colors (1.0.1)
 
Hi, sorry for DP but I really need help.I replace ShowActivity to CPrintToChatAll, dont work, in chat i see {red}text but no text

exvel 12-05-2009 12:41

Re: [INC] Colors (1.0.1)
 
Post here your entire code.
What game do you use?

KrankFL 12-06-2009 07:03

Re: [INC] Colors (1.0.1)
 
Will this be updated for L4D2 ? I would love to get turquoise working :)

exvel 12-06-2009 07:49

Re: [INC] Colors (1.0.2)
 
Update 1.0.2
  • Left 4 Dead 2 support
  • Removed {yellow} tag. Use {green} in L4D for yellow color.

mrj 12-08-2009 15:05

Re: [INC] Colors (1.0.1)
 
Quote:

Originally Posted by exvel (Post 1007557)
Post here your entire code.
What game do you use?

cs:s
Code:

PerformReloadAdmins(client)
{
    /* Dump it all! */
    DumpAdminCache(AdminCache_Groups, true);
    DumpAdminCache(AdminCache_Overrides, true);

    LogAction(client, -1, "\"%L\" refreshed the admin cache.", client);
    ReplyToCommand(client, "%t", "Admin cache refreshed");
}

sorry, no showactivity but replytocommand, but with showactivity i have same problem.its a main sourcemod plugin basecommands/reloadadmins.sp

exvel 12-08-2009 15:14

Re: [INC] Colors (1.0.2)
 
I don't see here CPrintToChat function and any color tags.

mrj 12-09-2009 03:54

Re: [INC] Colors (1.0.2)
 
Quote:

Originally Posted by exvel (Post 1010461)
I don't see here CPrintToChat function and any color tags.

sorry, i post original file...
here is edited :
Code:

#include colors

PerformReloadAdmins(client)
{
    /* Dump it all! */
    DumpAdminCache(AdminCache_Groups, true);
    DumpAdminCache(AdminCache_Overrides, true);

    LogAction(client, -1, "\"%L\" refreshed the admin cache.", client);
    CPrintToChatAll("{red}Admin cache refreshed");
}

public AdminMenu_ReloadAdmins(Handle:topmenu,
                              TopMenuAction:action,
                              TopMenuObject:object_id,
                              param,
                              String:buffer[],
                              maxlength)
{
    if (action == TopMenuAction_DisplayOption)
    {
        Format(buffer, maxlength, "%T", "Reload admins", param);
    }
    else if (action == TopMenuAction_SelectOption)
    {
        PerformReloadAdmins(param);
        RedisplayAdminMenu(topmenu, param);   
    }
}

public Action:Command_ReloadAdmins(client, args)
{
    PerformReloadAdmins(client);

    return Plugin_Handled;
}


exvel 12-09-2009 13:35

Re: [INC] Colors (1.0.2)
 
change
PHP Code:

#include colors 

to
PHP Code:

#include <colors> 


mrj 12-09-2009 14:35

Re: [INC] Colors (1.0.2)
 
Quote:

Originally Posted by exvel (Post 1011342)
change
PHP Code:

#include colors 

to
PHP Code:

#include <colors> 


uh sry, i have #include <colors> but i am in the work and i havent edited file here, i edit in the work

exvel 12-10-2009 13:24

Re: [INC] Colors (1.0.2)
 
Well, this code looks ok. Do you have colors.inc in the scripting/include folder?

xbatista 12-11-2009 09:51

Re: [INC] Colors (1.0.2)
 
Quote:

L 12/11/2009 - 16:22:44: SourceMod error session started
L 12/11/2009 - 16:22:44: Info (map "de_dust2") (file "errors_20091211.log")
L 12/11/2009 - 16:22:44: [SM] Plugin encountered error 25: Call was aborted
L 12/11/2009 - 16:22:44: [SM] Native "ThrowError" reported: Using two team colors in one message is not allowed
L 12/11/2009 - 16:22:44: [SM] Displaying call stack trace for plugin "zombie_mod_misc.smx":
L 12/11/2009 - 16:22:44: [SM] [0] Line 272, H:\srcds\cstrike\addons\sourcemod\scripting\i nclude\colors.inc::CFormat()
L 12/11/2009 - 16:22:44: [SM] [1] Line 62, H:\srcds\cstrike\addons\sourcemod\scripting\i nclude\colors.inc::CPrintToChat()
L 12/11/2009 - 16:22:44: [SM] [2] Line 220, H:\srcds\cstrike\addons\sourcemod\scripting\z ombie_mod_misc.sp::Say_Command()
L 12/11/2009 - 16:22:47: [SM] Plugin encountered error 25: Call was aborted
When using {lightgreen}

exvel 12-11-2009 10:10

Re: [INC] Colors (1.0.2)
 
xbatista
Just read an error. Also there are information about this in the FAQ.
You can't use more then one team color (lightgreen, red, blue) in one message

xbatista 12-11-2009 17:04

Re: [INC] Colors (1.0.2)
 
Can you make that we can use more than 1? Or it's impossible?

mrj 12-12-2009 04:46

Re: [INC] Colors (1.0.2)
 
Quote:

Originally Posted by exvel (Post 1012356)
Well, this code looks ok. Do you have colors.inc in the scripting/include folder?

sure, compilator → no errors


All times are GMT -4. The time now is 22:58.

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