08.08.2011, 14:23
Hi, my todays question is..... 
How to create a birthday question with a dialog. i already have it with ingame text but now i want to have it with a dialog. now i have no idea how to do this. this is my actual code:
First the Message:
And then the registration step/function:

How to create a birthday question with a dialog. i already have it with ingame text but now i want to have it with a dialog. now i have no idea how to do this. this is my actual code:
First the Message:
pawn Код:
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREY, "Ok so you're male, let's go on:");
SendClientMessage(playerid, COLOR_WHITE, "2. When is your Birthday (format 02.06.1990)");
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
pawn Код:
if(RegistrationStep[playerid] == 2)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
split(text, DateInfo, '.');
if(year - strvalEx(DateInfo[2]) > 100 || strvalEx(DateInfo[2]) < 1 || strvalEx(DateInfo[2]) >= year)
{
ClearChatbox(playerid, 8);
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE, "When is your Birthday? (Format: DD.MM.YYYY)");
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
ClearChatbox(playerid, 2);
return 0;
}
new check = year - strvalEx(DateInfo[2]);
if(check == year)
{
ClearChatbox(playerid, 8);
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE, "When is your Birthday? (Format: DD.MM.YYYY)");
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
ClearChatbox(playerid, 2);
return 0;
}
if(strvalEx(DateInfo[1]) > month)
{
check -= 1;
}
else if(strvalEx(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
ClearChatbox(playerid, 8);
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
format(string, sizeof(string), "Ok, so you're %d Years old.",PlayerInfo[playerid][pAge]);
SendClientMessage(playerid, COLOR_GREY, string);
RegistrationStep[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, "3. Where are you from, type in: LS, SF, LV or LC.");
SendClientMessage(playerid, COLOR_GREEN, "-----------------------------------------------------------------------");
ClearChatbox(playerid, 2);
return 0;
}