register with caracters and big letter register
#1

how i can when a player at dialog it's input password, check if the password have a number, a big letter and minim 6 characters
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=365818
This thread has some solutions you can look through.
Big letter - it is called uppercase (lowercase for small letters).
To find the length of the password, you can use the https://sampwiki.blast.hk/wiki/Strlen function.


You could also try using a regex plugin and writing a pattern or searching for one online since there are lots of them available in places like stackoverflow.
Reply
#3

PHP код:
CheckPw(password[]){
    new 
cntNumbers,
        
cntBigLetters,
        
len=strlen(password);
    if(
len 6)return 0;
    for(new 
ileni++){
        switch(
password[i]){
            case 
'0'..'9':    cntNumbers++;
            case 
'A'..'Z':    cntBigLetters++;
        }
    }
    return (
cntNumbers>=&& cntBigLetters>=3);

Reply
#4

thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)