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

[INC] Colors (1.0.5)


Post New Thread Reply   
 
Thread Tools Display Modes
bshenkd
Junior Member
Join Date: Dec 2009
Old 02-08-2010 , 13:40   Re: [INC] Colors (1.0.2)
Reply With Quote #101

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?
__________________
bshenkd is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 02-08-2010 , 14:03   Re: [INC] Colors (1.0.2)
Reply With Quote #102

Yes, sure.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
bshenkd
Junior Member
Join Date: Dec 2009
Old 02-08-2010 , 17:40   Re: [INC] Colors (1.0.2)
Reply With Quote #103

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.
__________________
bshenkd is offline
theY4Kman
Join Date: Jun 2007
Location: Yak
Old 02-08-2010 , 18:44   Re: [INC] Colors (1.0.2)
Reply With Quote #104

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).
__________________
http://y4kstudios.com
Is that loud enough? Oh, while I have you, check out Viper.
theY4Kman is offline
Send a message via ICQ to theY4Kman Send a message via AIM to theY4Kman Send a message via MSN to theY4Kman Send a message via Yahoo to theY4Kman Send a message via Skype™ to theY4Kman
DieterM75
Senior Member
Join Date: Aug 2009
Old 02-11-2010 , 14:00   Re: [INC] Colors (1.0.2)
Reply With Quote #105

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
DieterM75 is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 02-11-2010 , 14:32   Re: [INC] Colors (1.0.2)
Reply With Quote #106

Quote:
Originally Posted by DieterM75 View Post
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.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
DieterM75
Senior Member
Join Date: Aug 2009
Old 02-11-2010 , 14:46   Re: [INC] Colors (1.0.2)
Reply With Quote #107

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();
}
}

Last edited by DieterM75; 02-11-2010 at 15:31.
DieterM75 is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 02-11-2010 , 15:23   Re: [INC] Colors (1.0.2)
Reply With Quote #108

You should use CPrintToChatAllEx.
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
crazytina
Member
Join Date: Jan 2010
Old 02-14-2010 , 14:50   Re: [INC] Colors (1.0.2)
Reply With Quote #109

sorry if sound dume but were you put it ??? ^^ for give me
crazytina is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 02-15-2010 , 04:17   Re: [INC] Colors (1.0.2)
Reply With Quote #110

Quote:
5. How to install it?

Put colors.inc into sourcemod/scripting/include folder.
Add this into the code:
PHP Code:
#include <colors> 
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
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 04:40.


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