03.08.2012, 12:17
1. You don't have to create new Dialog[AllDialogs] - look at this
2. Simple tip
3. What Vince said
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");
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");