What's wrong?
#1

So tell me how to make this label look like:
Код:
I like cookies
because cookies
are good.
instead of
Код:
i like cookies because cookies are good.
Код:
 	if(strcmp(cmd, "/opis", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Nie zalogowałeś się !");
return 1;
}
if(opis[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Posiadasz już opis pierw usun swуj opis komendą /opisusun");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
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, "UŻYJ: /opis [tekst] /opisusun");
return 1;
}
format(string, sizeof(string), "%s %s", sendername, result);
Opis[playerid] = Create3DTextLabel(string, COLOR_PURPLE, 0.0, 0.0, 0.0, 10.0, 0, 0);
Attach3DTextLabelToPlayer(Opis[playerid], playerid, 0.0, 0.0, -0.5);//nakłada opis,i ustawia wysokość
Update3DTextLabelText(Opis[playerid], COLOR_FADE1, string);//nakłada opis graczowi
format(string, sizeof(string), "Twoj Opis: %s", (result));
opis[playerid] +=1;
SendClientMessage(playerid, COLOR_GRAD2,string);
printf("%s", string);
}
else
{
Delete3DTextLabel(Opis[playerid]);
}
return 1;
}
if(strcmp(cmd, "/opisusun", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(opis[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Nie posiadasz opisu więc nie możesz go usunąć");
return 1;
}
Delete3DTextLabel(Opis[playerid]);
opis[playerid] -=1;
SendClientMessage(playerid, COLOR_GRAD2, "Opis został poprawnie usunięty");
}
return 1;
}
Reply
#2

I can't understand that language you have written in your code but:

pawn Код:
"Line1\nLine2\nLine3\nLine4"
So use \n for a new line
Reply
#3

How to apply \n to that?

Код:
format(string, sizeof(string), "%s %s", sendername, result);
Reply
#4

Will that be your 3D label string?

If yes, then use:

pawn Код:
format(string, sizeof(string), "%s \n %s", sendername, result);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)