Raised This Month: $ Target: $400
 0% 

[HelpREQ] How can I set up above avarage Round Time and colored text?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 07-29-2008 , 15:44   Re: [HelpREQ] How to set chat text colors, roundtime and forwarding
Reply With Quote #2

This is what you need to use for colored messages
Beware! Before showing the message to the player you must format it

PHP Code:
format(msg,sizeof(msg) -1,"xxx",any...)
colored_msg(id,msg
To change the colores of the font you need to use these characters:
PHP Code:
^x01 -> for normal color
^x03 -> for team color (red for terorwhite for specblue for ct)
^
x04 -> for green color 
Example of usage:
^x03 Make me cry ^x04 yea ^x01 mama

Will apear ( if you are terrorist)-> Make me cry yea mama
PHP Code:
public colored_msg(id,msg[])
{
    
message_begin(MSG_ONEget_user_msgid("SayText"), {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

The roundtime more than 10 ... sorry I don't know

To register forwards in fakemeta the function is:
PHP Code:
register_forward(FM_PlayerPreThink,"fw_pre"//in plugin init

public fw_pre(id)
{
// do stuff 

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
 



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 05:36.


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