28.10.2009, 21:09
[Tutorial]Creating the dialog.
Dialog? This is a creating the GUI.
Parameters;
Parameters in the function...
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:
Thanks!
Dialog? This is a creating the GUI.
Parameters;
Code:
playerid, dialogid, style, caption[], info[], button1[], button2[]
Code:
ShowPlayerDialog(playerid,dialogid,style,caption[], info[] ,button1[] ,button2[]);
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; }