Help 2 things - 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: Help 2 things (
/showthread.php?tid=308421)
Help 2 things -
Dan_Barocu - 03.01.2012
i want the normal chat pressing t in this color ex: Dan_Barocu Says:bla bla bla.. Please help meeeeeeeeeeeeeeeeee!
Re: Help 2 things -
#Pwn. - 03.01.2012
You want an /ooc Chat?
Re: Help 2 things -
Dan_Barocu - 03.01.2012
i want to press t and typee then if i press enter i want the chat to apear like this Dan_Barocu Says:Help me with this please...
Sorry for bad language im Romanian.
Re: Help 2 things -
Casper001 - 03.01.2012
Local chat with name in Orange and chat in Black, Just some Defines needed and its a /l command I think
Re: Help 2 things -
#Pwn. - 03.01.2012
SetPlayerColor(playerid,Orange);
Re: Help 2 things -
Dan_Barocu - 03.01.2012
and the writing is blue?
Re: Help 2 things -
#Pwn. - 03.01.2012
No only your Name, but you have to make an command like that:
/chat or /c
Re: Help 2 things -
Dan_Barocu - 03.01.2012
can you help me with comand please?
Re: Help 2 things -
#Pwn. - 03.01.2012
Well..Try this! I script it in 5 Minutes :3
Код:
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;
}
Re: Help 2 things -
Wesley221 - 03.01.2012
pawn Код:
#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
}