[Ajuda] oque й que esta errado aqui
#1

quando a pessoa digita a senha do resgitro apareзe server closed conction


pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

 if(dialogid == REGISTRO)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
                new Nome[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Nome, sizeof(Nome));
                new String[128];
                format(String, sizeof(String), "Olб %s vocк ainda nгo tem uma conta, \nDigite uma senha para continuar:", Nome);
                ShowPlayerDialog(playerid, REGISTRO, DIALOG_STYLE_INPUT, "Registro", String, "Registrar", "Cancelar");
                SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
                return 1;
            }
            new Nome[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Nome, sizeof(Nome));
            new String[128];
            format(String, sizeof(String), CONTAS, Nome);

            DOF2_CreateFile(String);
            new str[32];
            DOF2_SetString(String,"RegisterDate",str);
            format(String, sizeof(String),"SERVER: Vocк criou a conta \"%s\" com a senha \"%s\". Nгo se esqueзa da sua senha. ***",PlayerName(playerid), inputtext);
            SendClientMessage(playerid,-1, String);
            DOF2_SaveFile();
            logado[playerid] = 1;
            ShowPlayerDialog(playerid, DIALOG_PAIS, DIALOG_STYLE_LIST, "Vida do Crime  - INICIO", "Escolher Organizaзгo", "Selecionar", "Voltar");
            return 1;
     
        }
    }
    if(dialogid == LOGIN)
    {
        if(response)
        {
            if(!strlen(inputtext))
            {
                new Nome[MAX_PLAYER_NAME];
                GetPlayerName(playerid, Nome, sizeof(Nome));
                new String[128];
                format(String, sizeof(String), "Olб %s vocк ja й registrado, \nDigite sua senha:", Nome);
                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Registro", String, "Logar", "Cancelar");
                SendClientMessage(playerid,0x1E90FFAA,"Senha incorreta digite-a novamente");
                return 1;
            }
            new Nome[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Nome, sizeof(Nome));
            new String[128];
            format(String, sizeof(String), CONTAS, Nome);
                return 1;
            }
            else
            {
                SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
                new String[128];
                new Nome[41];
                format(String, sizeof(String), "Vocк erro sua senha %s! \nDigite-a novamente!", Nome);
                ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_INPUT, "Login", String, "Logar", "Cancelar");
            }
            return 1;
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Vocк nгo quis se logar, por este motivo serб Kickado");
            Kick(playerid);
            return 1;
        }

 return 1;
}
Reply
#2

PHP код:

public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
 if(
dialogid == REGISTRO)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
Nome[MAX_PLAYER_NAME];
                
GetPlayerName(playeridNomesizeof(Nome));
                new 
String[128];
                
format(Stringsizeof(String), "Olб %s vocк ainda nгo tem uma conta, \nDigite uma senha para continuar:"Nome);
                
ShowPlayerDialog(playeridREGISTRODIALOG_STYLE_INPUT"Registro"String"Registrar""Cancelar");
                
SendClientMessage(playerid,0x1E90FFAA,"Senha invalida, digite uma senha vбlida");
                return 
1;
            }
            new 
Nome[MAX_PLAYER_NAME];
            
GetPlayerName(playeridNomesizeof(Nome));
            new 
String[128];
            
format(Stringsizeof(String), CONTASNome);
            
DOF2_CreateFile(String);
            new 
str[32];
            
DOF2_SetString(String,"RegisterDate",str);
            
format(Stringsizeof(String),"SERVER: Vocк criou a conta \"%s\" com a senha \"%s\". Nгo se esqueзa da sua senha. ***",PlayerName(playerid), inputtext);
            
SendClientMessage(playerid,-1String);
            
DOF2_SaveFile();
            
logado[playerid] = 1;
            
ShowPlayerDialog(playeridDIALOG_PAISDIALOG_STYLE_LIST"Vida do Crime  - INICIO""Escolher Organizaзгo""Selecionar""Voltar");
            return 
1;
      
        }
    }
    if(
dialogid == LOGIN)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                new 
Nome[MAX_PLAYER_NAME];
                
GetPlayerName(playeridNomesizeof(Nome));
                new 
String[128];
                
format(Stringsizeof(String), "Olб %s vocк ja й registrado, \nDigite sua senha:"Nome);
                
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Registro"String"Logar""Cancelar");
                
SendClientMessage(playerid,0x1E90FFAA,"Senha incorreta digite-a novamente");
                return 
1;
            }
            new 
Nome[MAX_PLAYER_NAME];
            
GetPlayerName(playeridNomesizeof(Nome));
            new 
String[128];
            
format(Stringsizeof(String), CONTASNome);
      
//          return 1; // porque retornando ? existe mais codigo pra baixo . 
    //        } // olhe bem , chave fechando oque ??
            
else
            {
                
SendClientMessage(playerid,0x00FF00AA,"Senha incorreta digite-a novamente");
                new 
String[128];
                new 
Nome[41];
                
format(Stringsizeof(String), "Vocк erro sua senha %s! \nDigite-a novamente!"Nome);
                
ShowPlayerDialog(playeridLOGINDIALOG_STYLE_INPUT"Login"String"Logar""Cancelar");
            }
            return 
1;
        }
        else 
// << Pra que este else ? estб contrariando oque ?
        
{
            
SendClientMessage(playerid0xFF0000AA"Vocк nгo quis se logar, por este motivo serб Kickado");
            
Kick(playerid);
            return 
1;
        }
 return 
1;

Reply
#3

atй que compilou de boa e valeu a tentativa mais so salva a senha tu conheзe algum sistema de login e senha bom ? salvavel
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=350855
https://sampforum.blast.hk/showthread.php?tid=318868
https://sampforum.blast.hk/showthread.php?tid=256278

3 tutorias pra vocк ^^

Atй mais amigo
Reply
#5

Vocк pode colocar nesse seu sistema para salvar mais coisas, como skin, dinheiro etc..
Reply
#6

hahaha nгo passa codigo pronto fdpa n e isso que se falo arrombado....pra ele se passo prontim ne fdpa o meo eu postei tbm se era o caso.. eae? bonzao se foda seu FAVELADO DE OCULOS
Reply
#7

Quote:
Originally Posted by best95
Посмотреть сообщение
hahaha nгo passa codigo pronto fdpa n e isso que se falo arrombado....pra ele se passo prontim ne fdpa o meo eu postei tbm se era o caso.. eae? bonzao se foda seu FAVELADO DE OCULOS
Se olhar atentamente o cуdigo , verб que eu passei o mesmo cуdigo apenas comentei algumas linhas , mostrando
o erro para ele .

Me insultar nгo vai mudar nada hahaha estarei sempre derrubando essas "cerquinhas" no meu caminho .
Reply
#8

Quote:
Originally Posted by best95
Посмотреть сообщение
hahaha nгo passa codigo pronto fdpa n e isso que se falo arrombado....pra ele se passo prontim ne fdpa o meo eu postei tbm se era o caso.. eae? bonzao se foda seu FAVELADO DE OCULOS
fica falando merda ai nгo fdp ele so esta ajudando nгo vejo problema tu tem mais de 30 posts so de pedidos de ajuda
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)