Raised This Month: $ Target: $400
 0% 

Colored Text


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zemanel
Member
Join Date: Aug 2007
Old 08-19-2008 , 14:06   Colored Text
Reply With Quote #1

I want my plugin to write for example: Test . How can I do it? (^x03 will write in what color? :S)
zemanel is offline
scrtxxcaz
Senior Member
Join Date: Feb 2007
Location: a place u cant find
Old 08-19-2008 , 17:40   Re: Colored Text
Reply With Quote #2

^x01 default
^x03 ^x03 ^x03 team colors (only 1 can be in a message)
^x04 green

here's an example:
PHP Code:
static GREEN[] = "^x04"
static TEAM_COLOR[] = "^x03"
static YELLOW[] = "^x01"
new gameSayText
public plugin_int() {
     
gameSayText get_user_msgid("SayText")
}
public 
some_function(id) {
     new 
messge[124]
     new 
len format(message,123,"%sT",GREEN)
     
format(message[len],123,"%ses",YELLOW)
     
format(message[len],123,"%st",TEAM_COLOR)
     
print_message(id,message)
}
print_message(idmesg[]) {
     
message_begin(MSG_ONEgameSayText, {0,0,0}, id)
     
write_byte(id)
     
write_string(mesg)
     
message_end()

or even just
PHP Code:
public some_function(id) {
     new 
messge[124]
     
format(message,123,"^x04T^x01es^x03t")    //i believe this would work to
     
print_message(id,message)

text would come out Test. the last t would be the color of whatever team your on.

__________________
Please leave your name when giving me any karma

Counter Strike Freeze Tag
Status: Testing.... (bugs)

Revised Registration
Status: In Progress

Last edited by scrtxxcaz; 08-19-2008 at 17:41. Reason: typo
scrtxxcaz is offline
Send a message via AIM to scrtxxcaz
zemanel
Member
Join Date: Aug 2007
Old 08-19-2008 , 19:13   Re: Colored Text
Reply With Quote #3

that's the problem, i want the last part to be red, not whatever team.
zemanel is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-19-2008 , 19:33   Re: Colored Text
Reply With Quote #4

Take a look at ColorChat.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
zemanel
Member
Join Date: Aug 2007
Old 08-19-2008 , 19:41   Re: Colored Text
Reply With Quote #5

ok, but can u give me an example on how to do different colors in one sentence with that new color chat?
zemanel is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 08-19-2008 , 19:56   Re: Colored Text
Reply With Quote #6

Seriously? Did you even read the FIRST post in the thread he linked? He was kind enough to link you to something you apparently couldn't find by a simple search. Now you're asking him to repeat something that was stated in the FIRST post in that thread he linked. Give me a break!
__________________
Brad is offline
zemanel
Member
Join Date: Aug 2007
Old 08-19-2008 , 20:04   Re: Colored Text
Reply With Quote #7

i only asked u to do a code that is 3 times smaller then the rant u just did, anyways is ColorChat(0, RED, "^x03T^x01es^x04T) correct?
zemanel is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 08-19-2008 , 20:18   Re: Colored Text
Reply With Quote #8

You didn't ask me to do anything for you.

Was it really a rant? Was it!? WAS IT!!!11!1!oeneleven

The code you posted may or may not be correct. I'd guess it's one or the other. Test it and let us know which it was.

-- Waiting with Bated Breath in Michigan
__________________
Brad is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 08-19-2008 , 20:19   Re: Colored Text
Reply With Quote #9

OMFG Brad is back. Hi, Brad.
__________________
stupok is offline
Old 08-19-2008, 20:37
hleV
This message has been deleted by hleV. Reason: What was I thinking... lol
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 03:04.


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