27.12.2010, 11:53
pawn Код:
if(dialogid == 2) {
if(!response) {
SendClientMessage(playerid, COLOR_RED, "You must register.");
Kick(playerid);
}
if(strval(inputtext)<101 && strval(inputtext)>17) {
new age = strval(inputtext);
pInfo[playerid][Age] = age;
format(string, sizeof(string), "Immigration Officer: Ok, so you are %d years old.", age);
SendClientMessage(playerid, COLOR_WHITE, string);
dini_IntSet(fileLoc, "Age", age);
pInfo[playerid][Step] = 1;
registerPlayer(playerid);
} else {
SendClientMessage(playerid, COLOR_WHITE, "Immigration Officer: ((You must be between the ages of 18-100 to play.))");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Age", "Enter your age in the box below:", "Enter", "Cancel");
}
} else if(dialogid == 4) {
new string2[128];
if(!response) {
SendClientMessage(playerid, COLOR_RED, "You must register.");
Kick(playerid);
}
strcat(string2, inputtext, sizeof(string2));
format(string, sizeof(string), "Immigration Officer: %s accent, it sounds like.", inputtext);
dini_Set(fileLoc, "Accent", inputtext);
strcat(pInfo[playerid][Accent], inputtext);
pInfo[playerid][Registered] = 1;
dini_IntSet(fileLoc, "Registered", 1);
HasJustRegistered[playerid] = true;
SpawnPlayer(playerid);
}