Raised This Month: $ Target: $400
 0% 

client_print color prefix help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EzzEt
Junior Member
Join Date: Jun 2008
Location: Sweden
Old 03-20-2009 , 15:25   client_print color prefix help!
Reply With Quote #1

Hello! I want to set a green prefix name on all client_prints on a plugin and wonder if someone can tell me how to get it to work.
For ex. "[NP] Welcome to the server" And only [NP] should be green!
I have try to do some code but i dont get it to work.

Please help me! And tell me what i have done wrong.

Code:
new const pPrefix[] = "[NP]";
Code:
public client_putinserver(id)
{
    new Msg[256];
    new len = formatex(Msg, 255, "^x04%s^x01 ", pPrefix);
    vformat(Msg[len], 255-len, pPrefix, 3);
    Msg[192] = '^0';
    
    message_begin(MSG_ONE, get_user_msgid("pPrefix"), {0,0,0}, id)
    write_byte(id)
    write_string(Msg)
    message_end()
}

client_print (0, print_chat, "%s some text some text some text", pPrefix)
EzzEt 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 08:51.


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