No cut-off in text - 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: No cut-off in text (
/showthread.php?tid=469969)
No cut-off in text -
Chrillzen - 15.10.2013
Hey, when I type something very long it gets cut-off. I need help with the string splitting into two lines so the text doesn't get cut-off.
pawn Код:
CMD:b(playerid, params[])
{
new
string[128],
action[128];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, COLOR_GREY, "[Usage]: /b [text]");
return 1;
}
else
{
format(string, sizeof(string), "(( %s: %s ))", GetName(playerid), action);
ProxDetector(20, playerid, string, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
}
return 1;
}
Re: No cut-off in text -
Konstantinos - 15.10.2013
The limit is 144 for client messages. You used only 100, so you get 43 characters more (+ NULL).
pawn Код:
CMD:b(playerid, params[])
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_GREY, "[Usage]: /b [text]");
new string[144];
format(string, sizeof(string), "(( %s: %s ))", GetName(playerid), params);
ProxDetector(20, playerid, string, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY, COLOR_GREY);
return 1;
}
Re: No cut-off in text -
Chrillzen - 15.10.2013
Thanks, mate.