AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   client_print color prefix help! (https://forums.alliedmods.net/showthread.php?t=88110)

EzzEt 03-20-2009 15:25

client_print color prefix help!
 
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)


AntiBots 03-20-2009 15:43

Re: client_print color prefix help!
 
1 Attachment(s)
You need to see this

EzzEt 03-20-2009 16:04

Re: client_print color prefix help!
 
Quote:

Originally Posted by AntiBots (Post 785255)
You need to see this

In that source file! What funktion have this variable: g_saytext = get_user_msgid("SayText") ?

AntiBots 03-20-2009 16:57

Re: client_print color prefix help!
 
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

EzzEt 03-20-2009 17:15

Re: client_print color prefix help!
 
Quote:

Originally Posted by AntiBots (Post 785320)
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.


All times are GMT -4. The time now is 08:51.

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