Adding ID after players name in chat! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Adding ID after players name in chat! (
/showthread.php?tid=356804)
Adding ID after players name in chat! -
Spike Cena - 04.07.2012
Hello all l have this:
pawn Код:
new to_others[MAX_CHATBUBBLE_LENGTH+1];
format(to_others,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
}
{
new string[128], pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof (string), "%s[%d]: %s", pname, playerid, text);
SendClientMessageToAll(0xFFFFFFAA, string);
}
return 0;
}
But in chat all players names are white how to change them to their skin colour help pleas?!?!
Re: Adding ID after players name in chat! -
Tee - 04.07.2012
pawn Код:
new to_others[MAX_CHATBUBBLE_LENGTH+1];
format(to_others,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
}
{
new string[128], pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof (string), "%s[%d]: {FFFFFF}%s", pname, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
return 0;
}
Send the message with the player's color using "GetPlayerColor" and setting the text to white using "{FFFFFF}".
Re: Adding ID after players name in chat! -
FUNExtreme - 04.07.2012
Might want to check this out to, could be useful in the future and adding the id depending on how you want the end result to look
https://sampwiki.blast.hk/wiki/SendPlayerMessageToAll
Re: Adding ID after players name in chat! -
Spike Cena - 04.07.2012
its working thanks but how to set that ID to gray bc l want that colour so the ID would be more visible?
Re: Adding ID after players name in chat! -
Tee - 04.07.2012
pawn Код:
new to_others[MAX_CHATBUBBLE_LENGTH+1];
format(to_others,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
SetPlayerChatBubble(playerid,to_others,MESSAGE_COLOR,35.0,10000);
}
{
new string[128], pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof (string), "%s{C0C0C0}[%d]{FFFFFF}: %s", pname, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
}
return 0;
}
Re: Adding ID after players name in chat! -
Spike Cena - 04.07.2012
Thanks very much