SA-MP Forums Archive
Other way to 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: Other way to chat (/showthread.php?tid=280727)



Other way to chat - knackworst - 02.09.2011

Hi, since my setplayercolor is bugged as hell i need another way of chatting, so i thought about this: is it possible to chat using sendclientm to all? So the text the player types will be inserted so i can use the text in a sendclientmessage to zll? So: sendcmtoall: playername: message...


Re: Other way to chat - Zonoya - 02.09.2011

its possible but INCREDIBLY hard to do mate


Re: Other way to chat - Kush - 02.09.2011

Quote:
Originally Posted by knackworst
Посмотреть сообщение
Hi, since my setplayercolor is bugged as hell i need another way of chatting, so i thought about this: is it possible to chat using sendclientm to all? So the text the player types will be inserted so i can use the text in a sendclientmessage to zll? So: sendcmtoall: playername: message...
Elaborate a little more.


Re: Other way to chat - knackworst - 02.09.2011

Well as u can see in my prev discusion u can see my setplayercolor is bugged so i mustfind A different wAy to chat cuz the team will now chat, but they are the wrong color...


Re: Other way to chat - Kyle_Olsen - 02.09.2011

If you just want to chat normally with everyone as if you type normal, use this:

pawn Код:
public OnPlayerText(playerid, text[])
{
   if(IsPlayerConnected(playerid))
   {
       new string[128], name[24];
       GetPlayerName(playerid, name, sizeof(name));
       format(string, sizeof(string), "%s: %s", name, text);
       SendClientMessageToAll(0xFFFFFFFF, string); // 0xFFFFFFFF is the color white. change it to whatever you want
   }
   return 0;
}



Re: Other way to chat - knackworst - 02.09.2011

Thank you! Thts wht i needed, so i can insert html color code in the message too right?


Re: Other way to chat - Kyle_Olsen - 02.09.2011

No, HTML code cannot be used in SA-MP chatting. PAWN and HTML are two really different code languages, and HTML only works on WEBSITES.


Respuesta: Other way to chat - Alex_Obando - 02.09.2011

http://bfxtylez.bf.funpic.de/PawnoColors.htm


Re: Other way to chat - knackworst - 02.09.2011

But i thought i can use the {numbers here} color code to change the color whitin a message


Re: Other way to chat - Kingunit - 02.09.2011

You can use those #codes from here (http://www.colorpicker.com/) Pick a color and do it like this:

pawn Код:
#COLOR_WHITE  0xCOLORFF
For example:
pawn Код:
#COLOR_RED 0xA10000FF
Hope you understand this above. You just need to add the 0x infront of the code and FF behind the code