SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/12/2019, 06:12 AM   #1
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 257
Reputation: 6
Default Align items dialog

How to fix align items by those |||

like this?
Code:
        new final[2048], str[256];
        format(str,sizeof(str),"(1)24/7\t|||\t(2)Restaurant\t|||\t(3)Ammunation\t|||\t(4)Loterica\t|||\t(5)SexShop\n");
        strcat(final,str);
        format(str,sizeof(str),"(6)Suburban\t|||\t(7)Binco\t|||\t(8)BincoZIP\t|||\t(9)Alahambra\t|||\t(10)BarGrove\n");
        strcat(final,str);
        ShowPlayerDialog(playerid,20000,DIALOG_STYLE_MSGBOX,"Bizz Type:",final,"Ok","");
i tried with spaces, but it shows too wrong

what should i do?

Last edited by binnyl; 02/01/2020 at 09:11 AM.
binnyl is offline   Reply With Quote
Old 31/12/2019, 07:11 AM   #2
SiNaGaMeR
Big Clucker
 
Join Date: Feb 2018
Location: Germany
Posts: 63
Reputation: 1
Default Re: Align items dialog

try
PHP Code:
\
** you typed prision instead of prison in id 35
SiNaGaMeR is offline   Reply With Quote
Old 31/12/2019, 09:57 AM   #4
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 257
Reputation: 6
Default Re: Align items dialog

like this?
Code:
        new final[2048], str[256];
        format(str,sizeof(str),"(1)24/7\t|||\t(2)Restaurant\t|||\t(3)Ammunation\t|||\t(4)Loterica\t|||\t(5)SexShop\n");
        strcat(final,str);
        format(str,sizeof(str),"(6)Suburban\t|||\t(7)Binco\t|||\t(8)BincoZIP\t|||\t(9)Alahambra\t|||\t(10)BarGrove\n");
        strcat(final,str);
        ShowPlayerDialog(playerid,20000,DIALOG_STYLE_MSGBOX,"Bizz Type:",final,"Ok","");

Last edited by binnyl; 02/01/2020 at 09:10 AM.
binnyl is offline   Reply With Quote
Old 31/12/2019, 10:03 AM   #5
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 953
Reputation: 167
Default Re: Align items dialog

For short text such as (1)24/7 you will need more tabs (\t) and for more characters less tabs if any at all. If you want to align it perfectly, you need to constantly join the game and see if it needs more or less tabs or none, it will take some time.

Alternative way is headers dialog style with either 4 columns (14 lines) as the current msgbox style or 1-line per item (58 lines) with 2 columns (ID and name).
__________________
Calisthenics is offline   Reply With Quote
Old 02/01/2020, 09:10 AM   #6
binnyl
Huge Clucker
 
Join Date: Aug 2017
Posts: 257
Reputation: 6
Default Re: Align items dialog

i got it now, ty u wall
+reps
binnyl is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic dialog items terrance Scripting Help 4 02/11/2014 09:10 AM
whats the maximum amount of items listed in a dialog? lewismichaelbbc Scripting Help 1 11/06/2012 08:22 PM
Problem with loading dialog list items from file woaha Help Archive 12 14/06/2011 09:56 AM
How to add more items to my input dialog? ZamaXor Help Archive 4 24/09/2010 02:14 PM
Dynamic Dialog Items help Norn Help Archive 10 25/01/2010 10:52 PM


All times are GMT. The time now is 12:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.