password ?
#2

Код:
CheckPassword(string[])
{
    for(new i = strlen(string); i > 0; i--)
        if(!('A' <= string[i] <= 'Z') && !('a' <= string[i] <= 'z') && !('0' <= string[i] <= '9')) return false;

    return true;
}
Now check it like that in OnDialogResponse

Код:
new pKick[MAX_PLAYERS];
if(CheckPassword(inputtext))
{
       His password only contains Alphabets + numbers do your code now
}
else
{
      His password has some symbols or other language words,
      pKick[playerid] ++ ; // Adding +1 to his warning
      if(pKick[playerid] >= 10) // He've done this for more than 10 times
      {
            Kick(playerid); // Kicking him
      }
}
Reply


Messages In This Thread
password ? - by parames3010 - 06.05.2018, 05:04
Re: password ? - by FuNkYTheGreat - 06.05.2018, 05:15
Re: password ? - by parames3010 - 06.05.2018, 05:54
Re: password ? - by UFF - 06.05.2018, 05:58
Re: password ? - by parames3010 - 06.05.2018, 06:01
Re: password ? - by Logic_ - 06.05.2018, 06:27

Forum Jump:


Users browsing this thread: 1 Guest(s)