Raised This Month: $ Target: $400
 0% 

client_print color prefix help!


Post New Thread Reply   
 
Thread Tools Display Modes
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
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-20-2009 , 15:43   Re: client_print color prefix help!
Reply With Quote #2

You need to see this
Attached Files
File Type: sma Get Plugin or Get Source (kz_chatcolor.sma - 840 views - 11.6 KB)
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
EzzEt
Junior Member
Join Date: Jun 2008
Location: Sweden
Old 03-20-2009 , 16:04   Re: client_print color prefix help!
Reply With Quote #3

Quote:
Originally Posted by AntiBots View Post
You need to see this
In that source file! What funktion have this variable: g_saytext = get_user_msgid("SayText") ?
EzzEt is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-20-2009 , 16:57   Re: client_print color prefix help!
Reply With Quote #4

get_user_msgid("pPrefix") Dont Exist that msgid.

You can see that code. That i Put a Tag with Cvars. And have more support. Like for You the Msg to all Players
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
EzzEt
Junior Member
Join Date: Jun 2008
Location: Sweden
Old 03-20-2009 , 17:15   Re: client_print color prefix help!
Reply With Quote #5

Quote:
Originally Posted by AntiBots View Post
get_user_msgid("pPrefix") Dont Exist that msgid.

You can see that code. That i Put a Tag with Cvars. And have more support. Like for You the Msg to all Players
AntiBots thanks for all help you give me. Im Just wonder if you can edit my code like you want it to be. Or only give some exemple. I trying to learn.
EzzEt is offline
Reply


Thread Tools
Display Modes

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