SA-MP Forums Archive
Dialog problems... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog problems... (/showthread.php?tid=542842)



Dialog problems... - mkmk - 22.10.2014

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;
}



Re: Dialog problems... - Diti1 - 22.10.2014

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


Re: Dialog problems... - MeCom - 22.10.2014

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", "");



Re: Dialog problems... - Diti1 - 22.10.2014

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 =_=


Re: Dialog problems... - Stinged - 22.10.2014

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.


Re: Dialog problems... - mkmk - 22.10.2014

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!


Re: Dialog problems... - mkmk - 22.10.2014

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)


Re: Dialog problems... - Rudy_ - 23.10.2014

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;
}



Re: Dialog problems... - Beckett - 23.10.2014

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.


Re: Dialog problems... - mkmk - 23.10.2014

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.