05.08.2012, 11:40
when I put in the dialog an age that's allowed according to what I've set, it still shows invalid age
pawn Код:
if(dialogid == 2)
{
if(response)
{
new age = strlen(inputtext);
if(age < 18 || age > 50)
{
SCM(playerid, -1, "Invalid age.");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Select your age","Invalid age\n Type your age to continue.","Set","Quit");
return 1;
}
else
{
Player[playerid][Age] = age;
format(string, sizeof(string), "Your age is: -%d-",age);
SendClientMessage(playerid, COLOR_YELLOW, string);
RegStep[playerid] = 3;
return 1;
}
}
else
{
SCM(playerid, -1, "You did not put your age. (Kicked)");
Kick(playerid);
}
}