lenght in 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: lenght in chat (
/showthread.php?tid=583010)
lenght in chat -
TheMasterNico - 24.07.2015
I see in the wiki the max length in chat is 144, but this command, the length in any text is 125
pawn Код:
CMD:ooc(playerid, params[])
{
new message[144];
if(sscanf(params, "s[144]", message)) return CmdUsageMessage(playerid, "(/o)oc <Texto>");
printf("message: %d", strlen(message));
GlobalOOCMessage(playerid, message);
return 1;
}
The text is: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae leo feugiat dui mattis luctus sit amet id ligula. Quisque vehicula cras amet."
the strlen print: "message: 125"
їWhy?
The new text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae leo feugiat dui mattis luctus sit amet id ligula. Quisque
Re : lenght in chat -
Dutheil - 24.07.2015
Don't use sscanf for this.
PHP код:
CMD:ooc(playerid, params[])
{
if(isnull(params)) return CmdUsageMessage(playerid, "(/o)oc <Texto>");
printf("message: %d", strlen(params));
GlobalOOCMessage(playerid, params);
return 1;
}
Re: lenght in chat -
Vince - 24.07.2015
While chat
output might be 144 chars,
input may be restricted to 128 chars.
Respuesta: lenght in chat -
TheMasterNico - 24.07.2015
I changed to "isnull" but the length is still 125.
I don't know about the input
Re: lenght in chat -
xVIP3Rx - 24.07.2015
You can type 128 character but also you can "sendclientmessage" up to 144 chars
SendClientMessage
Quote:
const message[] The text that will be displayed (max 144 characters).
|
Respuesta: lenght in chat -
TheMasterNico - 25.07.2015
Oh, okay. Thanks