[Ajuda] Servidor trava .. DOF2
#1

bom .. voltei a fazer o Login e Registro em Dialog, tб pronto, mais quando eu entro no servidor fica lб
Код:
[22:22:29] Connected. Joining the game...

[22:22:29] » {FF0000}Lucas (ID:0) Entrou {FFFFFF}no {66FF33}Servidor!

[22:22:29]  **********************************************************************************

[22:22:29]                         Bem vindo

[22:22:29]                     Tipos de Partidas

[22:22:29]           AAD | Arena's | Team Death Match

[22:22:29]  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[22:22:29] Para ver seus stats digite /Stats
e fica nisso, ele "congela" quando vai carregar o dialog, carrega tudo acima do dialog ..

parte dele do OnPlayerConnect
pawn Код:
new file[64];
GetPlayerName(playerid,file,sizeof(file));
format(file,sizeof(file),DOF2_File(file));
if(DOF2_FileExists(file))
{
    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Bem Vindo Novamente, Logue-se","{FFFFFF}Coloque sua {00FF22}senha {FFFFFF}Para logar!","Log-in","Quit");

}


else
{
    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registre-se para poder jogar!","{FFFFFF}Coloque sua {00FF22}senha {FFFFFF}Para registrar!","Register","Quit");

}
e no OnDialogResponse
pawn Код:
switch(dialogid)  {
    case DIALOG_REGISTER:                      
    {
        if(!response) Kick(playerid);          
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"Registre-se para poder jogar!","{FFFFFF}Coloque sua {00FF22}senha {FFFFFF}Para registrar!","Register","Quit");
        if(response) {                          
            new file[64];                        
           GetPlayerName(playerid,file,sizeof(file));
            format(file,sizeof(file),DOF2_File(file));
            DOF2_CreateFile(file, inputtext);    
            DOF2_SetInt (file, "Kills", 0);      
            DOF2_SetInt (file, "Deaths", 0);      
            DOF2_SetInt (file, "AdminLevel", 0);  
            DOF2_SaveFile();            
               }
    }
    case DIALOG_LOGIN: {
        if(!response) Kick(playerid);            
        if(response) {                          
            new file[64];                      
                                                 
            GetPlayerName(playerid,file,sizeof(file));
                                                 
            format(file,sizeof(file),DOF2_File(file));
            if(DOF2_FileExists(file)) {          
                                           
                if(DOF2_CheckLogin(file,inputtext)) {
                                                 
                    PlayerInfo[playerid][pKills] = DOF2_GetInt(file,"Kills");
                    PlayerInfo[playerid][pDeaths] = DOF2_GetInt(file,"Deaths");
                    PlayerInfo[playerid][pAdmin] = DOF2_GetInt(file,"AdminLevel");
                                 
                    return 1;
                }
                else {                          
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Senha Incorreta!","{F81414}Vocк digitou uma senha errada\n{FFFFFF}Digite sua senha aqui para entrar !","Log-in","Quit");
                    return 1;
                }
            }
        }
    }
}
Reply
#2

por que ninguйm me responde =/
Reply
#3

Faзa o debug no cуdigo que nгo estб sendo executado
Reply
#4

nгo sei fazer nгo =[
Reply
#5

pode estar criando um arquivo jб existente ou carregando um inxistente.
Reply
#6

Quote:
Originally Posted by [JD]BlackFire
Посмотреть сообщение
pode estar criando um arquivo jб existente ou carregando um inxistente.
nгo =[
Reply
#7

Espalhe 'printf' pelo cуdigo enumerados, e veja em qual parte eles param de ser exibidos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)