07.03.2013, 18:34
So I need help with second dialog is not showing up (dregister5)...
My list of dialogs
My list of dialogs
pawn Код:
#define dregister 1
#define dlogin 2
#define dregister1 3
#define dregister2 4
#define DIALOG_CLICK 5
#define DIALOG_ADMIN 6
#define RCON_DIALOG 7
#define dregister3 8
#define dregister4 9
#define dregister5 10
#define dregister6 11
pawn Код:
if (dialogid == dregister4)
{
if(strlen(inputtext))
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
split(inputtext, DateInfo, '/'); //<--- Here is the error (( text is not defined )) but how to define it??
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
ShowPlayerDialog(playerid,dregister4,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Next");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
ShowPlayerDialog(playerid,dregister4,DIALOG_STYLE_INPUT,"Error","When is your Birthday? ( DD/MM/YYYY )","Enter","Next");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
pInfo[playerid][Age] = check;
return 0;
}
ShowPlayerDialog(playerid, dregister5, DIALOG_STYLE_LIST, "What is your religious position?", "Christian\n Islam\n Buddhism\n Judaism\n Atheist", "Select", "Cancel");
}
if (dialogid == dregister5)
{
if (response)
{
if (listitem == 0)
{
SendClientMessage(playerid, green, "Your current religion Christian");
pInfo[playerid][Religion] = 0;
}
if (listitem == 1)
{
SendClientMessage(playerid, green, "Your current religion Islam");
pInfo[playerid][Religion] = 1;
}
if (listitem == 3)
{
SendClientMessage(playerid, green, "Your current religion Buddhism");
pInfo[playerid][Religion] = 3;
}
if (listitem == 7)
{
SendClientMessage(playerid, green, "Your current religion Judaism");
pInfo[playerid][Religion] = 7;
}
if (listitem == 14)
{
SendClientMessage(playerid, green, "Your current religion Atheist");
pInfo[playerid][Religion] = 14;
}
}
else
{
ShowPlayerDialog(playerid, dregister5, DIALOG_STYLE_LIST, "What is your religious position?", "Christian\nIslam\nHinduism\nBuddhism\nJudaism\nAtheist", "Select", "Cancel");
}
ShowPlayerDialog(playerid, dregister6, DIALOG_STYLE_LIST, "Which fighting style you would like to learn?", "Normal\nBoxing\nKungFu\nKnee Head\nGrab Kick\nElbow ", "Purchase", "Cancel");
}