[Tutorial]Creating the dialog.
#1

[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!
Reply
#2

Nice tutorial, but the explanation of creating list elements is missing. And please write some notes about formatting the text with \n and \t.
Reply
#3

\t =
Reply
#4

\t is a placeholder for tab

And BlackWolfA, you could atleast do something by yourself, not copy everything from the wiki
Reply
#5

http://forum.sa-mp.com/index.php?topic=130168.0

just use that guide.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)