16.08.2018, 13:38 
	
	
	
		Hi again,
my dialog_age isnt working and does not let anyone get past it to spawn and go to the spawn point, it is also meant to say: Your age is: '18' but it does not do this either. It allows me to complete the dialog gender, however.
	
	
	
	
my dialog_age isnt working and does not let anyone get past it to spawn and go to the spawn point, it is also meant to say: Your age is: '18' but it does not do this either. It allows me to complete the dialog gender, however.
PHP код:
        case DIALOG_GENDER:
        {
            new string[128];
            format(string, sizeof(string), "Male\nFemale");
            ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "What is your characters gender?",string,"Select", "");
            if(!response) return ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "What is your characters gender?",string,"Select", "");
            if(listitem == 0)
            {
                SendClientMessage(playerid, -1, "You've selected: 'Male'");
                new query[225];
                playerInfo[playerid][playerGend] = 1;
                format(query, sizeof(query), "UPDATE `accounts` SET `playerGend` = '%d', WHERE `playerName` = '%s'", playerInfo[playerid][playerGend], playerInfo[playerid][playerName]);
                mysql_tquery(Database, query);
                new string2[128];
                format(string2, sizeof(string2), "Please select an age between: '17' and '90'.");
                ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "How old is your Character?",string2,"Select", "");
            }
            else if(listitem == 1)
            {
                SendClientMessage(playerid, -1, "You've selected: 'Female'");
                new query[225];
                playerInfo[playerid][playerGend] = 2;
                format(query, sizeof(query), "UPDATE `accounts` SET `playerGend` = '%d', WHERE `playerName` = '%s'", playerInfo[playerid][playerGend], playerInfo[playerid][playerName]);
                mysql_tquery(Database, query);
                new string2[128];
                format(string2, sizeof(string2), "Please select an age between: '17' and '90'.");
                ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "How old is your Character?",string2,"Select", "");
            
            }
        }
        case DIALOG_AGE:
        {
            new string[128], age;
            /*format(string, sizeof(string), "Please select an age between: '17' and '90'.");
            ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "How old is your Character?",string,"Select", "");
            */
            age = strval(inputtext);
            if(!response) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "How old is your Character?",string,"Select", "");
            if(age > 17 || age <= 90)
            return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "How old is your Character?",string,"Select", "");
            
            new query[600];
            format(string, sizeof(string), "You have selected: '%d'.", age);
            SendClientMessage(playerid, -1, string);
            format(query, sizeof(query), "UPDATE `accounts` SET `playerAge` = '%d', WHERE `playerName` = '%s'", playerInfo[playerid][playerAge], playerInfo[playerid][playerName]);
            mysql_tquery(Database, query);
            mysql_tquery(Database, query, "OnPlayerRegister", "d", playerid);
        } 


