[Ajuda] LOGIN
#1

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;

Reply
#2

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


Forum Jump:


Users browsing this thread: 4 Guest(s)