18.03.2014, 13:17
Hello,
i wrote this code:
dialog looks like this:
But I need to look like this:
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;
}
But I need to look like this:
how to do it using tabs?