17.04.2013, 09:46
Hy,i need to verify the age of players,and i wonder if i can do that with "if" statament ori regex match?can somebody help me please.Thanks very much
//top of script
new PlayerAge[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Age", "Please define your age below:", "Ok", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, ...)
{
if(dialogid == 1)
{
if(response)
{
PlayerAge[playerid] = strval(inputtext);
}
}
return 1;
}
Simply do this:
pawn Код:
|
if(strval(inputtext) > 12 && strval(inputtext) < 39)