dialog - 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 (
/showthread.php?tid=659673)
dialog -
Zeus666 - 12.10.2018
PHP код:
CMD:leader(playerid)
{
ShowPlayerDialog(playerid, 1200, DIALOG_STYLE_MSGBOX, "TEX1", "Welcome %s %s,\nPlease select.", "ACTION1", "ACTION2", "ACTION3", "ACTION4",GetRankName(playerid),PlayerName(playerid));
return 1;
}
What's wrong with it ? It gives me
PHP код:
warning 202: number of arguments does not match definition
4x times
Re: dialog -
v1k1nG - 12.10.2018
You are using 2 wrong arguments. Delete last 2 ofw them, those are the buttons and there can be max 2
Re: dialog -
UFF - 12.10.2018
Код:
new string[200], string2[200];
format(string2, sizeof(string2), "ACTION 1/nACTION 2/nACTION 3/nACTION 4"); // Actions
format(string, sizeof(string), "Welcome %s %s, Please select",GetRankName(playerid),PlayerName(playerid));
ShowPlayerDialog(playerid, 1200, DIALOG_STYLE_MSGBOX, string, string2, "Select", "Cancel");
Maybe this!
Re: dialog -
Zeus666 - 12.10.2018
I want multiple buttons. How can I do it?
Re: dialog -
GangstaSunny. - 12.10.2018
Use DIALOG_STYLE_LIST instead. You can show _MSGBOX before to say something like "in the next step, Plesse select ..."
Re: dialog -
d3Pedro - 12.10.2018
Quote:
Originally Posted by Zeus666
I want multiple buttons. How can I do it?
|
You cannot, ShowPlayerDialog allows you to use only two buttons.
Check the wiki for more details >
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Edit:
You can do this instead:
PHP код:
CMD:leader(playerid)
{
new string[64];
format(string, sizeof(string), "Welcome %s %s,\nPlease select.",GetRankName(playerid),PlayerName(playerid));
ShowPlayerDialog(playerid, 1200, DIALOG_STYLE_LIST, string, "Action 1\nAction 2\n Action3\nAction4", "Select", "Cancel");
return 1;
}
Re: dialog -
v1k1nG - 12.10.2018
Quote:
Originally Posted by Zeus666
I want multiple buttons. How can I do it?
|
Use textdraws for that, create a box, create a textdraw with text and create as many buttons you like.