[Scripting Help]Max chat string
#1

My server chat string is too short, how can I make it longer? To type more sentences . Please help.

Thanks.
Reply
#2

sendclientmessage is 128 max per line and you can change that
Reply
#3

Well, you can make it so it uses SendClientMessage for the message on OnPlayerText so you can type longer sentences.
Reply
#4

Quote:
Originally Posted by [HiC
TheKiller ]
Well, you can make it so it uses SendClientMessage for the message on OnPlayerText so you can type longer sentences.
As he said, you can do this:
pawn Код:
public OnPlayerText(playerid, text[])
{
  SendPlayerMessageToAll(playerid, " ");
  SendClientMessageToAll(0xFFFFFFFF, text);
  return 0;
}
That would be something like this:
Код:
Miguel:
This is the message, just shown by the code I just told you.
Instead of:
Код:
Miguel: This is the message by the normal chat.
Reply
#5

Quote:
Originally Posted by SAWC™
Quote:
Originally Posted by [HiC
TheKiller ]
Well, you can make it so it uses SendClientMessage for the message on OnPlayerText so you can type longer sentences.
As he said, you can do this:
pawn Код:
public OnPlayerText(playerid, text[])
{
  SendPlayerMessageToAll(playerid, " ");
  SendClientMessageToAll(0xFFFFFFFF, text);
  return 0;
}
That would be something like this:
Код:
Miguel:
This is the message, just shown by the code I just told you.
Instead of:
Код:
Miguel: This is the message by the normal chat.
Well, the chatbox limits it when you type the string too long so it would overall be pointless tbh. There is no way to edit this I just realized.
Reply
#6

There should be a way. I've seen on one server that you can only go like :

1)Hello my name is Derrick and I'm from Los Santos Police Departament.

And the other server was like :

2)Hello my name is Derrick and I'm from Los Santos Police Departament. I use my tazer 2 times a day and it helps me.

In the 1st case, when I keep typing, my message just cuts on the middle, and I have to finish it with a second message or use /b too *correct myself.
Reply
#7

pawn Код:
stock SplitString(CharPerLine, StringToSplit[])
{
  new Lines = floatround(strval(StringToSplit) / CharPerLine, floatround_ceil);
  new Tempstr[256];
  for(new x = 1; x<lines; x++)
  {
    strmid(Tempstr, StringToSplit, x*150 - 150, x*150);
    SendClientMessageToAll(0xFF0000AA, Tempstr);
  }
  return 1;
}
Have no idea if it will work, I'm almost asleep at the computer lolz.
Reply
#8

Does it work for OOC like in /b and /ooc?
Reply
#9

Anyone could help on that please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)