[Ajuda] Problema Sistema de Login.
#7

Quote:
Originally Posted by IlanZ
Посмотреть сообщение
PHP код:
case DIALOG_LOGIN: 
{ 
    for(new 
a = 0; a < 100; a++){ SendClientMessage(playerid, AZUL_CLARO, " -- "); }
    if(!
response) 
    { 
        
SendClientMessage(playerid, CINZA, "SERVER: Que pena que vocк saiu, caso queira fazer seu Login novamente, digite /logar, ou /quit para sair!"); 
        
TogglePlayerSpectating ( playerid, 1 ) ; 
        
tentativas[playerid] = 0;                 
        return 
1; 
    } 
    else 
    { 
        if(
strlen(inputtext) < 5 || strlen(inputtext) > 20) return 1;
        if(
strcmp(inputtext, DOF2_GetString(OnPlayerAccount(playerid), "Senha"), true) == 0) 
        { 
            
SpawnPlayer(playerid); 
            new 
string[120]; 
            
format(string, sizeof(string), "[SERVER] Olб %s Seja Bem Vindo Novamente ao Brasil HardForever!", PlayerName(playerid)); 
            
SendClientMessage(playerid, CIANO, string); 
            
TimeContas(playerid); 
        } 
        else 
        { 
            if(
tentativas[playerid] >= 2) 
            { 
                new 
string[120]; 
                
format(string, sizeof(string), "[SERVER] O(A) Player %s foi kickado por excedor o limite de (%d) tentativas de Login!", PlayerName(playerid), tentativas[playerid]+1); 
                
SendClientMessage(playerid, 0xFF7171AA, string); 
                
KickP(playerid); 
            }             
            else 
            { 
                new 
string[120]; 
                
tentativas[playerid]++; 
                
format(string, sizeof(string), "[SERVER] ATENCAO! SENHA INCORRETA! Tentativas [%d/3]", tentativas[playerid]); 
                
SendClientMessage(playerid, 0xFF7171AA, string); 
                
format(string, sizeof(string), "Bem Vindo Novamente %s ! \n\nPor favor digite sua senha!\n{FFFFFF}IP: {3AE21D}%s", PlayerName(playerid), PlayerIp(playerid)); 
                
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Fazendo seu Login", string,"Logar-se", "Cancelar"); 
                
TogglePlayerSpectating ( playerid, 1 ) ; 
            } 
        }                 
    } 
} 
Colocar um SendClientMessage nesse return й bom pra avisar que o player errou a senha, ou seja:

PHP код:
if(strlen(inputtext) < 5 || strlen(inputtext) > 20) return SendClientMessage(playerid, -1, "Vocк nгo digtitou uma senha correta."); 
Reply


Messages In This Thread
Problema Sistema de Login. - by matheusdorado - 06.10.2017, 21:16
Re: Problema Sistema de Login. - by IlanZ - 06.10.2017, 21:29
Re: Problema Sistema de Login. - by Whoo - 06.10.2017, 21:49
Re: Problema Sistema de Login. - by matheusdorado - 06.10.2017, 21:57
Re: Problema Sistema de Login. - by matheusdorado - 06.10.2017, 21:59
Re: Problema Sistema de Login. - by IlanZ - 06.10.2017, 22:05
Re: Problema Sistema de Login. - by Gguiz - 06.10.2017, 22:12
Re: Problema Sistema de Login. - by matheusdorado - 06.10.2017, 22:13

Forum Jump:


Users browsing this thread: 1 Guest(s)