dialog formatting
#1

hello again and my name is anykey

how could i format these one?

massive:
Код:
new hdia[][] = {
	{"{CBCBCB}#\t{6289DB}Настройка\t{CBCBCB}Параметр\t{CBCBCB} \n"},

	{"{CBCBCB}1\t{6289DB}Никнейм:\t{CBCBCB}kleet\t{CBCBCB}ИЗМЕНИТЬ\n"},
	{"{CBCBCB}2\t{6289DB}Цвет ника:\t{CBCBCB}0x6289DBFF\t{CBCBCB}ИЗМЕНИТЬ\n"},
	{"{CBCBCB}3\t{6289DB}Внешность:\t{CBCBCB}%d\t{CBCBCB}ИЗМЕНИТЬ\n"},
	{"{CBCBCB}4\t{6289DB}Комната:\t{CBCBCB}СТАНДАРТ\t{CBCBCB}ИЗМЕНИТЬ\n"},
	{"{CBCBCB}5\t{6289DB}Модератор:\t{CBCBCB}НЕТ\t{CBCBCB}-\n"},
	{"{CBCBCB}6\t{6289DB}СВЯЗЬ С АДМИНИСТРАЦИЕЙ\t{CBCBCB}/report\t{CBCBCB} \n"},
	{"{CBCBCB}7\t{CBCBCB}Дата:\t{CBCBCB}2018/1/19\t{CBCBCB}18:24\n"}

};
@public

Код:
        new helps[600];
  		for(new i; i < sizeof(gencmd); i++)
  		{
    		strcat(helps, gencmd[i]);
			ShowPlayerDialog(playerid, 3, 5, "{6289DB}СПИСОК ФУНКЦИОНАЛА СЕРВЕРА {F0F0F0}: Heatwave Project", helps, "Выбор", "");
		}
if I just format it:
Код:
        new helps[600];
  		for(new i; i < sizeof(gencmd); i++)
  		{
SOME FORMAT
    		strcat(helps, gencmd[i]);
			ShowPlayerDialog(playerid, 3, 5, "{6289DB}СПИСОК ФУНКЦИОНАЛА СЕРВЕРА {F0F0F0}: Heatwave Project", helps, "Выбор", "");
		}
	return 1;
ingame result: https://i.imgur.com/u7W0PgG.jpg

PLS help me
Reply
#2

Код:
new helps[600],gencmd[128];

format(gencmd, sizeof gencmd,"{CBCBCB}1\t{6289DB}Никнейм:\t{CBCBCB}kleet\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}2\t{6289DB}Цвет ника:\t{CBCBCB}0x6289DBFF\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}3\t{6289DB}Внешность:\t{CBCBCB}%d\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}4\t{6289DB}Комната:\t{CBCBCB}СТАНДАРТ\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}5\t{6289DB}Модератор:\t{CBCBCB}НЕТ\t{CBCBCB}-\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}6\t{6289DB}СВЯЗЬ С АДМИНИСТРАЦИЕЙ\t{CBCBCB}/report\t{CBCBCB} \n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}7\t{CBCBCB}Дата:\t{CBCBCB}2018/1/19\t{CBCBCB}18:24\n", FORMAT HERE );
strcat(helps, gencmd);


ShowPlayerDialog(playerid, 3, 5, "{6289DB}СПИСОК ФУНКЦИОНАЛА СЕРВЕРА {F0F0F0}: Heatwave Project", helps, "Выбор", "");
Your welcome
Reply
#3

Quote:
Originally Posted by DeathCore
Посмотреть сообщение
Код:
new helps[600],gencmd[128];

format(gencmd, sizeof gencmd,"{CBCBCB}1\t{6289DB}Никнейм:\t{CBCBCB}kleet\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}2\t{6289DB}Цвет ника:\t{CBCBCB}0x6289DBFF\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}3\t{6289DB}Внешность:\t{CBCBCB}%d\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}4\t{6289DB}Комната:\t{CBCBCB}СТАНДАРТ\t{CBCBCB}ИЗМЕНИТЬ\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}5\t{6289DB}Модератор:\t{CBCBCB}НЕТ\t{CBCBCB}-\n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}6\t{6289DB}СВЯЗЬ С АДМИНИСТРАЦИЕЙ\t{CBCBCB}/report\t{CBCBCB} \n", FORMAT HERE );
strcat(helps, gencmd);

format(gencmd, sizeof gencmd,"{CBCBCB}7\t{CBCBCB}Дата:\t{CBCBCB}2018/1/19\t{CBCBCB}18:24\n", FORMAT HERE );
strcat(helps, gencmd);


ShowPlayerDialog(playerid, 3, 5, "{6289DB}СПИСОК ФУНКЦИОНАЛА СЕРВЕРА {F0F0F0}: Heatwave Project", helps, "Выбор", "");
Your welcome
thx but that's don't work for me. I'll try it on blank gamemode tomorrow
Reply
#4

Alright, let's check your screenshot. You can see you first line is the HEADER of your dialog. Interesting.
What type of dialog we have where an header is required? (Taken from a_samp.inc)
// Player GUI Dialog
PHP код:
#define DIALOG_STYLE_MSGBOX                0
#define DIALOG_STYLE_INPUT                1
#define DIALOG_STYLE_LIST                2
#define DIALOG_STYLE_PASSWORD            3
#define DIALOG_STYLE_TABLIST            4
#define DIALOG_STYLE_TABLIST_HEADERS    5 
Yes, it's the style 5.
For some unknown reasons your prefer use 5 instead of DIALOG_STYLE_TABLIST_HEADERS which isn't the best option but anyway, your problem is here. Take the style 4 which doesn't require an header.

PHP код:
new helps[600];
for(new 
isizeof(hdia); i++)
    
strcat(helpshdia[i]); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)