Login special characters
#2

I made this function for you:

Код:
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;
}
Just before you write the password to the file, use

Код:
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!");
}
Reply


Messages In This Thread
Login special characters - by Crosshair - 30.03.2009, 01:29
Re: Login special characters - by Sandra18[NL] - 30.03.2009, 02:25
Re: Login special characters - by Crosshair - 30.03.2009, 11:15

Forum Jump:


Users browsing this thread: 1 Guest(s)