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)

bshenkd 02-08-2010 13:40

Re: [INC] Colors (1.0.2)
 
This is probably a stupid question, but can I use this with Connect Announce? I want my connect announcements to be in blue. Is this possible?

exvel 02-08-2010 14:03

Re: [INC] Colors (1.0.2)
 
Yes, sure.

bshenkd 02-08-2010 17:40

Re: [INC] Colors (1.0.2)
 
I tried using colors.inc with the connect announce sourcemod plugin, but it's not working.

Code:

"CountryShow"
{
        "messages"
        {
                "playerjoin"                "{BLUE}{PLAYERNAME} [{DEFAULT}{STEAMID}{BLUE}] has connected from ({DEFAULT}{PLAYERCOUNTRYSHORT}{BLUE})."
                "playerdisc"                "{BLUE}{PLAYERNAME} [{DEFAULT}{STEAMID}{BLUE}] has disconnected ({DEFAULT}{DISC_REASON}{BLUE})."
        }
        "messages_admin"
        {
                "playerjoin"                "{BLUE}{PLAYERTYPE} {PLAYERNAME} [{DEFAULT}{STEAMID}{BLUE}] has connected from ({DEFAULT}{PLAYERCOUNTRYSHORT}{BLUE})."
                "playerdisc"                "{BLUE}{PLAYERTYPE} {PLAYERNAME} [{DEFAULT}{STEAMID}{BLUE}] has disconnected ({DEFAULT}{DISC_REASON}{BLUE})."
        }

Whenever someone connects, it just reads {BLUE} as if it was normal text and not changing the color to blue.

theY4Kman 02-08-2010 18:44

Re: [INC] Colors (1.0.2)
 
How are you "using colors.inc with the connect announce sourcemod plugin"? For the colors to work, the plug-in must be rewritten to use the colors.inc functions (for example, by changing PrintToChatAll to CPrintToChatAll).

DieterM75 02-11-2010 14:00

Re: [INC] Colors (1.0.2)
 
hm my text does not even get blue nor read, simply LIGHTGREEN :/

PrintToChatAll ("\x01 1 .. \x02 2 .. \x03 3 .. \x04 4 .. \x05 5 .. \x06 6 .. \x07 7 .. \x08 8");

this neither.
mod is counterstrike source

exvel 02-11-2010 14:32

Re: [INC] Colors (1.0.2)
 
Quote:

Originally Posted by DieterM75 (Post 1085697)
hm my text does not even get blue nor read, simply LIGHTGREEN :/

PrintToChatAll ("\x01 1 .. \x02 2 .. \x03 3 .. \x04 4 .. \x05 5 .. \x06 6 .. \x07 7 .. \x08 8");

this neither.
mod is counterstrike source

Post the code.

DieterM75 02-11-2010 14:46

Re: [INC] Colors (1.0.2)
 
PrintToChat(client,"\x04[VIP-Message] \x03%s\x01: \x03%s", name, text[startidx+1]);

this should print blue text on the %s if i am ct, but it does not.
colors.inc doesnt format anything just repeats the text

#include <colors>
...
CPrintToChatAll("{GREEN}[VIP-Message]{TEAMCOLOR}%s{DEFAULT}:{TEAMCOLOR}%s",name,te xt);


//EDIT: this works like a charm...

stock SayText2All(author, const String:message[])
{
new Handle:buffer = StartMessageAll("SayText2");
if ( buffer != INVALID_HANDLE )
{
BfWriteByte(buffer, author);
BfWriteByte(buffer, true);
BfWriteString(buffer, message);
EndMessage();
}
}

exvel 02-11-2010 15:23

Re: [INC] Colors (1.0.2)
 
You should use CPrintToChatAllEx.

crazytina 02-14-2010 14:50

Re: [INC] Colors (1.0.2)
 
sorry if sound dume but were you put it ??? ^^ for give me

exvel 02-15-2010 04:17

Re: [INC] Colors (1.0.2)
 
Quote:

5. How to install it?

Put colors.inc into sourcemod/scripting/include folder.
Add this into the code:
PHP Code:

#include <colors> 




All times are GMT -4. The time now is 08:57.

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