Witam.
Napisałem sobie komendę na ustawianie opisu na postaci w 3d Tekst (jak na h-rp.pl) /opis
if(strcmp(cmd, "/opis", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Nie jesteś zalogowany !");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "WPISZ: /opis [tekst]");
SendClientMessage(playerid, COLOR_GRAD2, "WPISZ: /opis.usun - aby usunąć opis postaci.");
return 1;
}
if(Opis[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Posiadasz już opis!");
SendClientMessage(playerid, COLOR_GRAD2, "WPISZ: /opis.usun - aby usunąć opis postaci i ustawić nowy.");
return 1;
}
Opis[playerid] = 1;
format(string, sizeof(string), "%s", result);
opis[playerid] = Create3DTextLabel(string,0x9FA5DFFF,30.0,40.0,50.0,14.0,0,0);
Attach3DTextLabelToPlayer(opis[playerid], playerid, 0.0, 0.0, -0.7);
SendClientMessage(playerid, COLOR_WHITE, "INFO: Opis ustawiony!");
SendClientMessage(playerid, COLOR_GRAD2, "WPISZ: /opis.usun - aby usunąć opis postaci.");
}
return 1;
}
I cóż, tekst który ustawie na opis jest jedną linią. Czyli napisze sobie np opis:
Ubrany jest w eleganckie ciuchy. Pachnie od niego wodą kolońską, nosi czarne okulary.
Będzie on w grze na postaci w jednej linii i nie wygląda estetycznie. Chciałbym aby wyglądało to tak:
Ubrany jest w eleganckie ciuchy.
Pachnie od niego wodą kolońską,
nosi czarne okulary.
Czyli automatycznie dodawało " \n " co parę 4-5 wyrazów. Pomożecie jak to zrobić?