18.03.2014, 13:17
Hello,
i wrote this code:
dialog looks like this:
![](http://www.img.tpx.cz/uploads/Dialog%20failed.png)
But I need to look like this:
![](http://www.img.tpx.cz/uploads/dialog%20ok.png)
how to do it using tabs?
i wrote this code:
pawn Код:
#include <a_samp>
new Text[][] = {//Is not constant text
"Something",
"Something else",
"Other"
};
new Text2[][] = {
"Yes",
"No",
"Yes"
};
public OnPlayerSpawn(playerid)
{
new string[256];
for(new i;i<sizeof(Text);i++)
{
strcat(string,Text[i]);
if(strlen(Text[i]) < 4) strcat(string,"\t");
if(strlen(Text[i]) < 8) strcat(string,"\t");
if(strlen(Text[i]) < 12) strcat(string,"\t");
if(strlen(Text[i]) < 16) strcat(string,"\t");
strcat(string,Text2[i]);
strcat(string,"\n");
}
ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Caption",string,"OK","Cancel");
return 1;
}
![](http://www.img.tpx.cz/uploads/Dialog%20failed.png)
But I need to look like this:
![](http://www.img.tpx.cz/uploads/dialog%20ok.png)
how to do it using tabs?