03.01.2012, 15:13
i want the normal chat pressing t in this color ex: Dan_Barocu Says:bla bla bla.. Please help meeeeeeeeeeeeeeeeee!
ocmd:c(playerid,params[])
{
new text[128];
if(sscanf(params,"s",text))return SendClientMessage(playerid,ROT,"/c [text]");
SetPlayerColor(playerid,Orange);
format(text,sizeof(text),"Member %s: %s",SpielerName(playerid),text);
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
SendClientMessageToAll(Orange,text);
}
}
return 1;
}
#include <a_samp>
// some color defines, all the colors have to be like this
#define C_RED "{AA3333}"
#define C_GREEN "{33AA33}"
#define C_YELLOW "{FFFF00}"
#define C_BLUE "{0000BB}"
public OnPlayerText(playerid, text[])
{
new
pName[24],
pText[128]; // creating some variables which we will need
GetPlayerName( playerid, pName, sizeof pName ); // getting the player name and storing it in pName
format( pText, sizeof pText, ""C_BLUE"%s"C_YELLOW"(%i): "C_RED"%s", pName, playerid, text[0] ); // formatting the pText, to change the colors just change the "C_BLUE", "C_YELLOW" etc
SendClientMessage( playerid, GetPlayerColor( playerid ), pText ); // sending the message
return 0; // so it wont send the standart message
}