pawn Код:
//this would start the wizard
ShowPlayerDialog(playerid,DIALOG_USER_DOB,DIALOG_STYLE_INPUT,"DOB","Enter your Date Of Birth:\n Use the format YYYY\\MM\\DD","Enter","Skip");
//this is the struct
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid) // Lookup the dialogid
{
//###########Start profile wizard################
case DIALOG_USER_DOB:
{
if(!response)
{
//they skiped show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_GENDER,DIALOG_STYLE_LIST,"Gender","Male\r\nFemale","Enter","Skip");
}
//save DOB
//show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_GENDER,DIALOG_STYLE_LIST,"Gender","Male\r\nFemale","Enter","Skip");
}
case DIALOG_USER_GENDER:
{
if(!response)
{
//they skiped show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_ABOUT,DIALOG_STYLE_INPUT,"About","Enter a little info about you.","Enter","Skip");
}
//save Gender
//show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_ABOUT,DIALOG_STYLE_INPUT,"About","Enter a little info about you.","Enter","Skip");
}
case DIALOG_USER_ABOUT:
{
if(!response)
{
//they skiped show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_HOBBY,DIALOG_STYLE_INPUT,"Hobbies","Enter your Hobbies","Enter","Skip");
}
//save About
//show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_HOBBY,DIALOG_STYLE_INPUT,"Hobbies","Enter your Hobbies","Enter","Skip");
}
case DIALOG_USER_HOBBY:
{
if(!response)
{
//they skiped show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_SIG,DIALOG_STYLE_INPUT,"Signature","Enter your profile sig","Enter","Skip");
}
//save Hobby
//show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_SIG,DIALOG_STYLE_INPUT,"Signature","Enter your profile sig","Enter","Skip");
//1; // We processed it
}
case DIALOG_USER_SIG:
{
if(!response)
{
//they skiped show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_LOCATION,DIALOG_STYLE_INPUT,"Location","Enter your location","Enter","Skip");
}
//save Sig
//show next dialog
return ShowPlayerDialog(playerid,DIALOG_USER_LOCATION,DIALOG_STYLE_INPUT,"Location","Enter your location","Enter","Skip");
}
case DIALOG_USER_LOCATION:
{
if(!response)
{
//they skiped end the wizard
return 1;
}
//save Gender
//end the wizard
return 1; // We processed it
}
//###########end profile wizard################
case DIALOG_USER_LOGIN:
{
if(!response)
{
return 1; // We processed it
}
//blah blah
return 1; // We processed it
}
}
return 0;
}