SA-MP Forums Archive
[Scripting Help]Max chat string - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Scripting Help]Max chat string (/showthread.php?tid=151165)



[Scripting Help]Max chat string - Visualbr - 29.05.2010

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

Thanks.


Re: [Scripting Help]Max chat string - (SF)Noobanatior - 29.05.2010

sendclientmessage is 128 max per line and you can change that


Re: [Scripting Help]Max chat string - [HiC]TheKiller - 29.05.2010

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



Re: [Scripting Help]Max chat string - Miguel - 29.05.2010

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.



Re: [Scripting Help]Max chat string - [HiC]TheKiller - 29.05.2010

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.


Re: [Scripting Help]Max chat string - Visualbr - 29.05.2010

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.


Re: [Scripting Help]Max chat string - [HiC]TheKiller - 29.05.2010

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.


Re: [Scripting Help]Max chat string - Visualbr - 30.05.2010

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


Re: [Scripting Help]Max chat string - Visualbr - 30.05.2010

Anyone could help on that please?