Weird Problem with dialogs
#4

1. You don't have to create new Dialog[AllDialogs] - look at this
pawn Код:
//change
enum AllDialogs
{
    FirstRegisterStep,
    SecondRegisterStep,
    ThirdRegisterStep,
    CheckRegisterInfo,
    Login
}
new Dialog[AllDialogs];
//to
enum
{
    FirstRegisterStep,
    SecondRegisterStep,
    ThirdRegisterStep,
    CheckRegisterInfo,
    Login
}
//Now change
ShowPlayerDialog(playerid, Dialog[FirstRegisterStep], DIALOG_STYLE_LIST, RegisterString, "Male\nFemale", "Next", "Exit");
//to
ShowPlayerDialog(playerid, FirstRegisterStep, DIALOG_STYLE_LIST, RegisterString, "Male\nFemale", "Next", "Exit");
2. Simple tip
pawn Код:
if(listitem == 0) // Male
{
    new maleskin;
    maleskin = random(sizeof(CivMalePeds));
    PlayerInfo[playerid][pChar] = maleskin;
    PlayerInfo[playerid][pSex] = 1;
    print("Step 1");
    format(RegisterString, sizeof(RegisterString), "2. What is your birthdate? (Use dd/mm/yyyy)");
    ShowPlayerDialog(playerid, Dialog[SecondRegisterStep], DIALOG_STYLE_INPUT, "Date of Birth", RegisterString, "Next", "Exit");
    print("Step 2");
}
else if(listitem == 1) // Female
{
    new femaleskin;
    femaleskin = random(sizeof(CivFemalePeds));
    PlayerInfo[playerid][pChar] = femaleskin;
    PlayerInfo[playerid][pSex] = 2;
    format(RegisterString, sizeof(RegisterString), "2. What is your birthdate? (Use dd/mm/yyyy)");
    ShowPlayerDialog(playerid, Dialog[SecondRegisterStep], DIALOG_STYLE_INPUT, "Date of Birth", RegisterString, "Next", "Exit");
}      
//To
if(listitem == 0) // Male
{
    PlayerInfo[playerid][pChar] = random(sizeof(CivMalePeds));
    PlayerInfo[playerid][pSex] = 1;
 }
else if(listitem == 1) // Female
{
    PlayerInfo[playerid][pChar] = random(sizeof(CivFemalePeds))
    PlayerInfo[playerid][pSex] = 2;
}
ShowPlayerDialog(playerid, Dialog[SecondRegisterStep], DIALOG_STYLE_INPUT, "Date of Birth", "2. What is your birthdate? (Use dd/mm/yyyy)", "Next", "Exit");
3. What Vince said
Reply


Messages In This Thread
Weird Problem with dialogs - by Knappen - 02.08.2012, 19:05
Re: Weird Problem with dialogs - by Knappen - 02.08.2012, 21:09
Re: Weird Problem with dialogs - by Knappen - 03.08.2012, 11:52
Re: Weird Problem with dialogs - by Misiur - 03.08.2012, 12:17
Re: Weird Problem with dialogs - by Vince - 03.08.2012, 12:26
Re: Weird Problem with dialogs - by Knappen - 03.08.2012, 20:01

Forum Jump:


Users browsing this thread: 1 Guest(s)