SA-MP Forums Archive
[Ajuda] LOGIN - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] LOGIN (/showthread.php?tid=591161)



LOGIN - JuniorTheDM - 08.10.2015

Eu Digito Qualquer Senha e Loga '--'


PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
        if(
dialogid == DIALOG_REGISTRO)
      {
            if(
response)
            {
                if(!
strlen(inputtext))
                {
                    
format(Stringsizeof(String), "\n{7FFFD4}Nick: {1E90FF}%s Nгo Registrado\n\n{FFFFFF} Digite Uma Senha Para Registrar Sua Conta\n"PlayerName(playerid));
                    
ShowPlayerDialog(playeridDIALOG_REGISTRODIALOG_STYLE_PASSWORD"Sistema de Registro"String"Registrar""Cancelar");
                    return 
true;
                }
                
format(Stringsizeof(String), PASTA_CONTASPlayerName(playerid));
                
DOF2::CreateFile(String);
                
DOF2::SetString(String,"Senha"inputtext);
                 
DOF2::SaveFile();
                return 
true;
            }
            else
            {
                
SendClientMessage(playerid0xFF0000AA"Vocк Foi Kickado Porque Nгo Quis Se Registrar!!");
                
Kick(playerid);
                return 
true;
            }
      }
      if(
dialogid == DIALOG_LOGIN )
      {
        if(
response)
        {
                if(!
strlen(inputtext))
                {
                    
format(Stringsizeof(String), "{FFFFFF}Bem Vindo Novamente ({ADFF2F}%s{FFFFFF})\nDigite Sua Senha Abaixo Para Logar\n"PlayerName(playerid));
                       
ShowPlayerDialog(playeridDIALOG_LOGIN DIALOG_STYLE_PASSWORD"Nome Do Servidor - Login"String"Logar""Cancelar");
                    
SendClientMessage(playerid,0x1E90FFAA,"Digite Uma Senha Para Logar");
                    return 
true;
                }
                
format(Stringsizeof(String), PASTA_CONTASPlayerName(playerid));
                if(!
strcmp(inputtext,DOF2_GetString(String,"Senha"),false))
                {
                       
Logando(playerid);
                    return 
true;
                }
                else
                {
                    
format(Stringsizeof(String), "{FFFFFF}Bem Vindo Novamente ({ADFF2F}%s{FFFFFF})\nDigite Sua Senha Abaixo Para Logar\n"PlayerName(playerid));
                    
ShowPlayerDialog(playeridDIALOG_LOGIN DIALOG_STYLE_PASSWORD"Nome Do Servidor - Login"String"Logar""Cancelar");
                }
                return 
true;
            }
            else
            {
                
SendClientMessage(playerid0xFF0000AA"Vocк nгo quis se logar, por este motivo serб Kickado");
                
Kick(playerid);
                return 
true;
            }
      }
      return 
true;




Re: LOGIN - FanonRiouDiou - 08.10.2015

Quando o player errar a senha use
PHP код:
return 0