#1

how to script chat id?
example:

Test(ID:0): Hi

Not:

TestID:0) Hi
Reply
#2

To do this, you need to add new random colours because with default samp random colour dont work.

Than add:

pawn Код:
public OnPlayerText( playerid, text[] )
{
    new string[128], VBName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, VBName, MAX_PLAYER_NAME);
    format(string, sizeof(string),"{%h}%s[ID:%d]:{FFFFFF} %s" ,GetPlayerColor(playerid) >>> 8, VBName,playerid,text);
    SendClientMessageToAll(-1,string);
    SetPlayerChatBubble(playerid, text, COLOR_WHITE, 100.0, 10000);
    return 0;
}
If someone know how to do this with samp random colours, it will better!
Reply
#3

pawn Код:
public OnPlayerText(playerid, text[])
{
    new str[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s(ID:%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), str);
    return 0;
}
Reply
#4

What is " GetPlayerColor(playerid) >>> 8, VBName,playerid,text);"?
Reply
#5

Quote:
Originally Posted by RollTi
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    new str[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s(ID:%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), str);
    return 0;
}
I try it yours before 1 month, but the Name colour is black.
Reply
#6

Quote:
Originally Posted by RollTi
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    new str[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str), "%s(ID:%d): {FFFFFF}%s", name, playerid, text);
    SendClientMessageToAll(GetPlayerColor(playerid), str);
    return 0;
}
Thanks!!
Reply
#7

Quote:
Originally Posted by [M.A]Angel[M.A]
Посмотреть сообщение
What is " GetPlayerColor(playerid) >>> 8, VBName,playerid,text);"?
GetPlayerColor(playerid) >>> 8: This will get Name tag colour.
VBName: The player's name
playerid: The player's id
text: The test that player text.
Reply
#8

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
I try it yours before 1 month, but the Name colour is black.
Thank you too , 2 code's usefull!
Reply
#9

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
I try it yours before 1 month, but the Name colour is black.
Right! , problem i tried your one i dont know if works
Reply
#10

If you want i will give you the random colours code, so you can use it too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)