[Tutorial]Creating the 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Tutorial]Creating the dialog. (
/showthread.php?tid=105352)
[Tutorial]Creating the dialog. -
BlackWolfA - 28.10.2009
[Tutorial]Creating the dialog.
Dialog? This is a creating the GUI.
Parameters;
Code:
playerid, dialogid, style, caption[], info[], button1[], button2[]
Parameters in the function...
Code:
ShowPlayerDialog(playerid,dialogid,style,caption[], info[] ,button1[] ,button2[]);
dialogid : A number read.1-2-3-4-5... etc..
style : 3 style in the dialog.Styles 1 = DIALOG_STYLE_MSGBOX | 2 = DIALOG_STYLE_INPUT | 3 = DIALOG_STYLE_LIST... 1 = DSM (DIALOG_STYLE_MSGBOX) Message box | 2= DSI (DIALOG_STYLE_INPUT)Login-Register etc.. | 3= DSL (DIALOG_STYLE_LIST) List dialogs...
caption : Dialogs title
info : Read the notes-desepts etc..
button1 : 1.st button.Ex: Login
button2 : 2nd button.Ex:Cancel
Example:
Code:
if(strcmp(cmdtext, "/login", true) == 0)
{
new s[128];
new loginname[MAX_PLAYER_NAME];
GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
format(s,sizeof(s),"Welcome again, %s!\n\nContiune to login!",loginname);
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login Plase!",s,"Login","Cancel");
return 1;
}
Thanks!
Re: [Tutorial]Creating the dialog. -
Gergo1352 - 28.10.2009
Nice tutorial, but the explanation of creating list elements is missing. And please write some notes about formatting the text with
\n and
\t.
Re: [Tutorial]Creating the dialog. -
rannyere - 28.10.2009
\t =
Re: [Tutorial]Creating the dialog. -
dice7 - 28.10.2009
\t is a placeholder for tab
And BlackWolfA, you could atleast do something by yourself, not copy everything from the wiki
Re: [Tutorial]Creating the dialog. -
Daren_Jacobson - 29.10.2009
http://forum.sa-mp.com/index.php?topic=130168.0
just use that guide.