20.10.2012, 11:21
Hello there,
I want to know why my 'age' dialog isn't showing up (and if I change it with any dialog the other dialog doesn't work also, why?)
here is my code:
any help I will appreciate it!
I want to know why my 'age' dialog isn't showing up (and if I change it with any dialog the other dialog doesn't work also, why?)
here is my code:
PHP код:
if(dialogid == 3)//Gender
{
if(response)
{
SendClientMessage(playerid, -1, ""COL_GREEN"So, you are male.");
pData[playerid][pGender] = 1;
ShowPlayerDialog(playerid, D_AGE, DIALOG_STYLE_INPUT, "eL-RP:Age", "{FFFFFF}Choose Your Age, Only Available Ages Are From 18 to 90"COL_GREEN"(18-90)", "Done", "");
}
else {
SendClientMessage(playerid, -1, ""COL_GREEN"So, you are female.");
pData[playerid][pGender] = 2;
ShowPlayerDialog(playerid, D_AGE, DIALOG_STYLE_INPUT, "eL-RP:Age", "{FFFFFF}Choose Your Age, Only Available Ages Are From 18 to 90"COL_GREEN"(18-90)", "Done", "");
}
}
if(dialogid == D_AGE)//Age
{
if(response)
{
if(strlen(inputtext) > 2 || strval(inputtext) <= 17 || strval(inputtext) >= 91)
{
ShowPlayerDialog(playerid, D_AGE, DIALOG_STYLE_INPUT, "eL-RP:Age", "{FFFFFF}Choose Your Age, Only Available Ages Are From 18 to 90"COL_GREEN"(18-90)", "Done", "");
format(szQuery, 200, "{FFFFFF}Your Age Must be In This Average ( "COL_RED"18{FFFFFF} - "COL_RED"24{FFFFFF}90 )");
SendClientMessage(playerid, -1, szQuery);
}
else
{
pData[playerid][pAge] = strval(inputtext);
format(szQuery, 200, ""COL_BLUE"So, you are %d years-old.", pData[playerid][pAge]);
SendClientMessage(playerid, -1, szQuery);
format(szQuery, 200, "{FFFFFF}Welcome "COL_BLUE"%s(%d){FFFFFF} to the server, you're registered\n\nPlease log in by inputting your password.", szPlayerName, playerid);
ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "eL-RP:Login", szQuery, "Login", "");
}
}
else
{
ShowPlayerDialog(playerid, D_AGE, DIALOG_STYLE_INPUT, "eL-RP:Age", "{FFFFFF}Choose Your Age, Only Available Ages Are From 18 to 90"COL_GREEN"(18-90)", "Done", "");
}
}