case DIALOG_AGE: { if(!response) { if(pInfo[playerid][pLanguage] == 1) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Tasteaza varsta caracterului tau.", "Ok", "Close"); if(pInfo[playerid][pLanguage] == 2) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Type your character age.", "Ok", "Close"); } if(response) { if(!strlen(inputtext)) { if(pInfo[playerid][pLanguage] == 1) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Tasteaza o varsta cuprinsa intre 13 si 80.\n\nTasteaza varsta caracterului tau.", "Ok", "Close"); if(pInfo[playerid][pLanguage] == 2) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Type a age betweeen 13 and 80.\n\nType your character age.", "Ok", "Close"); } if(strval(inputtext) < 13 || strval(inputtext) > 80) { if(pInfo[playerid][pLanguage] == 1) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Tasteaza o varsta cuprinsa intre 13 si 80.\n\nTasteaza varsta caracterului tau.", "Ok", "Close"); if(pInfo[playerid][pLanguage] == 2) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Type a age betweeen 13 and 80.\n\nType your character age.", "Ok", "Close"); } if(!IsNumeric(inputtext)) { if(pInfo[playerid][pLanguage] == 1) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Tasteaza o varsta cuprinsa intre 13 si 80.\n\nTasteaza varsta caracterului tau.", "Ok", "Close"); if(pInfo[playerid][pLanguage] == 2) return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age", "Type a age betweeen 13 and 80.\n\nType your character age.", "Ok", "Close"); } else { new AgeQuerry[255]; mysql_format(Database, AgeQuerry, sizeof(AgeQuerry), "UPDATE `USERS` SET `Age` = '%d' WHERE `USERNAME`='%s'", inputtext, pInfo[playerid][pName]); mysql_query(Database, AgeQuerry); .....
new inputtext[ 4 ] = "250";
new iValue = strval( inputtext ); // iValue is now '250'
Thx, you know how to check if a string is a email? like if contains "@"
|
its useless to try and find @ because fake emails can still be put. x@y.z ..even if you try to find the big email names it still wont assure you there are not going to be any false emails...so working for nothing imo.
just tell them to use correct email because they`ll need it to reset their passwords and let them decide if they put their email or not. |