Other way to chat
#1

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...
Reply
#2

its possible but INCREDIBLY hard to do mate
Reply
#3

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.
Reply
#4

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...
Reply
#5

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;
}
Reply
#6

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

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.
Reply
#8

http://bfxtylez.bf.funpic.de/PawnoColors.htm
Reply
#9

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)