SA-MP Forums Archive
Problem with the 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)
+--- Thread: Problem with the string (/showthread.php?tid=603251)



Problem with the string - hugo69 - 20.03.2016

Here's a picture .. http://i.imgur.com/4ymeuuG.png

How to solve this problem ? Thank you in advance!

Here is the code of the script:

Код:
{
 	new BigString20[1024];
 	format(BigString20, 1024, "{00C3FF}01:\t{FF6347}ADMIRAL\t\t{00C3FF}45000$\n{00C3FF}02:\t{FF6347}BRAVURA\t\t{00C3FF}45000$\n{00C3FF}02:\t{FF6347}CADRONA\t\t{00C3FF}45000$\n{00C3FF}04:\t{FF6347}CLOVER\t\t{00C3FF}75000$");
	format(BigString20, 1024, "%s\n{00C3FF}05:\t{FF6347}ELEGY\t\t\t{00C3FF}180000$\n{00C3FF}06:\t{FF6347}EMPEROR\t\t{00C3FF}75000$\n{00C3FF}07:\t{FF6347}FORTUNE\t\t{00C3FF}75000$\n{00C3FF}08:\t{FF6347}GLENDALE\t\t{00C3FF}45000$", BigString20);
 	format(BigString20, 1024, "%s\n{00C3FF}09:\t{FF6347}GREENWOOD\t\t{00C3FF}75000$\n{00C3FF}10:\t{FF6347}INTRUDER\t\t{00C3FF}45000$\n{00C3FF}11:\t{FF6347}MANANA\t\t{00C3FF}45000$\n{00C3FF}12:\t{FF6347}MERIT\t\t\t{00C3FF}75000$", BigString20);
 	format(BigString20, 1024, "%s\n{00C3FF}13:\t{FF6347}PREMIER\t\t{00C3FF}85000$\n{00C3FF}14:\t{FF6347}SENTINEL\t\t{00C3FF}85000$\n{00C3FF}15:\t{FF6347}SULTAN\t\t{00C3FF}200000$\n{00C3FF}16:\t{FF6347}SUNRISE\t\t{00C3FF}145000$\n{00C3FF}17:\t{FF6347}WASHINGTON\t\t{00C3FF}75000$", BigString20);
 	format(BigString20, 1024, "%s\n{00C3FF}18:\t{FF6347}ALPHA\t\t\t{00C3FF}165000$\n{00C3FF}19:\t{FF6347}INFERNUS\t\t{00C3FF}200000$\n{00C3FF}20:\t{FF6347}URANUS\t\t{00C3FF}200000${FF6347}SABRE\t\t{00C3FF}70000${FF6347}NRG\t\t{00C3FF}200000$", BigString20);
 	ShowPlayerDialog(playerid, 43, DIALOG_STYLE_LIST, "{FF6347}CAR OWNERSHIP STORE", BigString20, "KUPNJA", "ZATVORI");
 	}



Re: Problem with the string - [WSF]ThA_Devil - 20.03.2016

You don't have a new line (\n) character for sabre and NRG. I added the numbers 21 and 22 as well. It still might have formatting issues, but I'm quite sure you can figure them out.
pawn Код:
new BigString20[1024];
    format(BigString20, 1024, "{00C3FF}01:\t{FF6347}ADMIRAL\t\t{00C3FF}45000$\n{00C3FF}02:\t{FF6347}BRAVURA\t\t{00C3FF}45000$\n{00C3FF}02:\t{FF6347}CADRONA\t\t{00C3FF}45000$\n{00C3FF}04:\t{FF6347}CLOVER\t\t{00C3FF}75000$");
    format(BigString20, 1024, "%s\n{00C3FF}05:\t{FF6347}ELEGY\t\t\t{00C3FF}180000$\n{00C3FF}06:\t{FF6347}EMPEROR\t\t{00C3FF}75000$\n{00C3FF}07:\t{FF6347}FORTUNE\t\t{00C3FF}75000$\n{00C3FF}08:\t{FF6347}GLENDALE\t\t{00C3FF}45000$", BigString20);
    format(BigString20, 1024, "%s\n{00C3FF}09:\t{FF6347}GREENWOOD\t\t{00C3FF}75000$\n{00C3FF}10:\t{FF6347}INTRUDER\t\t{00C3FF}45000$\n{00C3FF}11:\t{FF6347}MANANA\t\t{00C3FF}45000$\n{00C3FF}12:\t{FF6347}MERIT\t\t\t{00C3FF}75000$", BigString20);
    format(BigString20, 1024, "%s\n{00C3FF}13:\t{FF6347}PREMIER\t\t{00C3FF}85000$\n{00C3FF}14:\t{FF6347}SENTINEL\t\t{00C3FF}85000$\n{00C3FF}15:\t{FF6347}SULTAN\t\t{00C3FF}200000$\n{00C3FF}16:\t{FF6347}SUNRISE\t\t{00C3FF}145000$\n{00C3FF}17:\t{FF6347}WASHINGTON\t\t{00C3FF}75000$", BigString20);
    format(BigString20, 1024, "%s\n{00C3FF}18:\t{FF6347}ALPHA\t\t\t{00C3FF}165000$\n{00C3FF}19:\t{FF6347}INFERNUS\t\t{00C3FF}200000$\n{00C3FF}20:\t{FF6347}URANUS\t\t{00C3FF}200000$\n21:{FF6347}SABRE\t\t{00C3FF}70000$\n22:{FF6347}NRG\t\t{00C3FF}200000$", BigString20);
    ShowPlayerDialog(playerid, 43, DIALOG_STYLE_LIST, "{FF6347}CAR OWNERSHIP STORE", BigString20, "KUPNJA", "ZATVORI");



Re: Problem with the string - hugo69 - 20.03.2016

How to change the color of the number and move the price ? http://i.imgur.com/OXS3jLr.png


Re: Problem with the string - [WSF]ThA_Devil - 20.03.2016

Quote:
Originally Posted by hugo69
Посмотреть сообщение
How to change the color of the number and move the price ? http://i.imgur.com/OXS3jLr.png
use tab symbol (\t) and use embedded colours. Just look at the previous entries and see what was done there to make it work.


Re: Problem with the string - hugo69 - 20.03.2016

I'm a beginner so I do not get some things but here I got it now , thank you very much for this. Have a good evening !