09.04.2017, 08:45
Doesnt work good, i write insid the case my age (24) and shows again that dialog, after i press the SPACE on keyboard shows the next dialog, and ofc. with message "Ok, so you have 0 years."
pawn Код:
if(dialogid == DIALOG_REGAGE)
{
if(response)
{
new age = strval(inputtext);
if(sscanf(inputtext, "d", age))
{
if(!IsNumeric(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGAGE, 1, "Registration Step 2:", "How old are you ?", "Next", "");
if(age >= 7 || age <= 50)
{
PlayerInfo[playerid][pAge] = age;
format(string, sizeof(string), "Ok, so you have %d years.", age);
SendClientMessage(playerid, COLOR_YELLOW2, string);
ShowPlayerDialog(playerid, DIALOG_REGSPAWN, 2, "Where do you want to be spawned ?", "Los Santos\nSan Fierro\nLas Venturas", "Select", "");
}
else
{
SendClientMessage(playerid, COLOR_YELLOW2, "Type numbers betwen 5 and 50.");
ShowPlayerDialog(playerid, DIALOG_REGAGE, 1, "Registration Step 2:", "How old are you ?", "Next", "");
}
} else ShowPlayerDialog(playerid, DIALOG_REGAGE, 1, "Registration Step 2:", "How old are you ?", "Next", "");
} else ShowPlayerDialog(playerid, DIALOG_REGAGE, 1, "Registration Step 2:", "How old are you ?", "Next", "");
return 1;
}