[Ajuda] Sistema de Login com falha
#4

Nгo compilei entгo testa...
PHP код:

    new 
arquivo[40], nome[MAX_PLAYER_NAME]; 
    
GetPlayerName(playeridnome32); 
    
format(arquivo40"contas/%s.ini"nome); 
    if(
dialogid == DIALOG_REGISTRO
    { 
        if(!
response
        { 
            
Kick(playerid); 
            return 
1
        } 
        else 
        { 
            if(!
strlen(inputtext) || strlen(inputtext) < || strlen(inputtext) > 20
            { 
                
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Login""Vocк digitou sua senha errado, digite-a novamente para logar!\nSe errar 5 vezes vocк serб kickado!""Confirma""Cancelar"); 
                
SendClientMessage(playerid, -1"Digite uma senha entre 3 e 20 caracteres.");
                return 
1
            }  
            
            
DOF2_CreateFile(arquivo); 
            
DOF2_SetString(arquivo"senha"inputtext); 
            
DOF2_SetInt(arquivo"morreu"Player[playerid][morreu]); 
            
DOF2_SetInt(arquivo"matou"Player[playerid][matou]); 
            
DOF2_SetInt(arquivo"dinheiro"Player[playerid][dinheiro]); 
            
DOF2_SetInt(arquivo"level"Player[playerid][level]); 
            
DOF2_SaveFile(); 
            
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Login""Cadastro realizado com sucesso! Por favor, faзa login""Confirma""Cancela"); 
        } 
    } 
    if(
dialogid == DIALOG_LOGIN
     { 
        if(!
response
        { 
            
Kick(playerid); 
            return 
1
        } 
        else 
        { 
            if(
strcmp(DOF2_GetString(arquivo"senha"), inputtextfalse) == 0
            { 
                
Player[playerid][morreu] = DOF2_GetInt(arquivo"morreu"); 
                
Player[playerid][matou] = DOF2_GetInt(arquivo"matou"); 
                
Player[playerid][dinheiro] = DOF2_GetInt(arquivo"dinheiro"); 
                
Player[playerid][level] = DOF2_GetInt(arquivo"level"); 
                
GivePlayerMoney(playeridPlayer[playerid][dinheiro]); 
                
SetPlayerScore(playeridPlayer[playerid][level]); 
            } 
            else 
            { 
                
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Login""Vocк digitou sua senha errado, digite-a novamente para logar!\nSe errar 5 vezes vocк serб kickado!""Confirma""Cancelar"); 
                
Erro[playerid]++; 
                if(
Erro[playerid] == 5
                { 
                    
SendClientMessage(playerid0xFF0000FF"Vocк foi kickado por errar 5 vezes a sua senha!"); 
                    
Kick(playerid); 
                    return 
1
                } 
            } 
        } 
   }
    return 
1
Reply


Messages In This Thread
Sistema de Login com falha - by Mazin - 01.04.2016, 20:29
Re: Sistema de Login com falha - by F1N4L - 01.04.2016, 20:39
Re: Sistema de Login com falha - by Mazin - 01.04.2016, 21:35
Re: Sistema de Login com falha - by F1N4L - 01.04.2016, 21:41
Re: Sistema de Login com falha - by Mazin - 01.04.2016, 21:51
Re: Sistema de Login com falha - by F1N4L - 01.04.2016, 21:55
Re: Sistema de Login com falha - by Mazin - 02.04.2016, 04:13
Re: Sistema de Login com falha - by F1N4L - 02.04.2016, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)