Dialog problems...
#1

Well sorry if I seem a noob, but... I've created dialogs before, but now they're not working for me (no idea why). I've done it all correctly from what I know, so could somebody please help me:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp(cmdtext, "/help", true) == 0)
	{
		ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Help Menu", "Commands:\n/skin, /help, /(a)dmin(h)elp, /helpme, /admins, /administration [More to be added]/", "Select", "Cancel");
		return 1;
	}
	return 0;
}
Reply
#2

well you are suppost to continue Dialog at
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
Reply
#3

Its a message box nothing to do with OnDialogResponse

Do This:

at the top of your script after includes put this

Код:
#define DIALOG_HELP 3
Then in your command Do This :

Код:
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help Menu", "Commands:\n/skin  /help  /(a)dmin(h)elp  /helpme  /admins  /administration [More to be added]", "Close", "");
Reply
#4

Quote:
Originally Posted by MeCom
Посмотреть сообщение
Its a message box nothing to do with OnDialogResponse
he is using ShowPlayerDialog so he is suppost to do it at OnDialogResponse lol =_=
Reply
#5

Quote:
Originally Posted by Diti1
Посмотреть сообщение
he is using ShowPlayerDialog so he is suppost to do it at OnDialogResponse lol =_=
Not really.
He used DIALOG_STYLE_MSGBOX. So if he clicks any button, it just disappears.
Reply
#6

Quote:
Originally Posted by MeCom
Посмотреть сообщение
Its a message box nothing to do with OnDialogResponse

Do This:

at the top of your script after includes put this

Код:
#define DIALOG_HELP 3
Then in your command Do This :

Код:
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help Menu", "Commands:\n/skin  /help  /(a)dmin(h)elp  /helpme  /admins  /administration [More to be added]", "Close", "");
This worked, but when I included zcmd it didn't. Help please!
Reply
#7

Also got another issue that would really help me if it were fixed. I got these error codes.

(161) : error 006: must be assigned to an array
(187) : error 030: compound statement not closed at the end of file (started at line 144)
Reply
#8

Why do you think it would work if you use strcmp in Zcmd?
pawn Код:
CMD:help(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help Menu", "Commands:\n/skin  /help  /(a)dmin(h)elp  /helpme  /admins  /administration [More to be added]", "Close", "");
    return 1;
}
Reply
#9

Quote:

(161) : error 006: must be assigned to an array
(187) : error 030: compound statement not closed at the end of file (started at line 144)

Show us line 144-161.
Reply
#10

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
Why do you think it would work if you use strcmp in Zcmd?
pawn Код:
CMD:help(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Help Menu", "Commands:\n/skin  /help  /(a)dmin(h)elp  /helpme  /admins  /administration [More to be added]", "Close", "");
    return 1;
}
cheers.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)