30.03.2009, 02:25
I made this function for you:
Just before you write the password to the file, use
Код:
stock IsValidPassword(pass[]) { for(new i; i<strlen(pass); i++) { if((pass[i] < 48) || (pass[i] > 57 && pass[i] < 67) || (pass[i] > 90 && pass[i]< 97) || (pass[i] > 122)) return 0; } return 1; }
Код:
if(IsValidPassword(EnteredPassword)) { //password is valid (only 0-9 or Aa-Zz used) } else { SendClientMessage(playerid, 0xFF0000AA, "Invalid password! Please do not use special characters!"); }