[Ajuda] Me ajudem a arrumar?
#1

Estou com dificuldade em um sistema aqui.

Podem me ajudar?

Ele nгo quer pular a linha, na hora do registro : olha o print

ele fica %s/n o /n й pra pular linha entгo ficaria o dos da /n й pra outra linha.... e tambкm o registro sу aceita numeros, eu queria numeros e letras... e tambem o registro nгo tб salvando as contas. como resolve isso?


Prints
http://i.imgur.com/5lhSd.png

http://i.imgur.com/Z1tAw.png





Cуdigo :

pawn Код:
//----------------------------------------------------------------------------//
#include < a_samp >
#include < DOF2 >

//----------------------------------------------------------------------------//
#define     DIALOG_REGISTRO         1
#define     DIALOG_LOGAR            2
#define     UsuariosSalvos "/Usuarios/%s.ini"

//----------------------------------------------------------------------------//
enum Informacoes
{
    Senha,
    Matou,
    Morreu,
    Dinheiro,
    Vida,
    PlayerAdmin
}

//----------------------------------------------------------------------------//
new Player[MAX_PLAYERS][Informacoes];
new name[MAX_PLAYER_NAME];

//----------------------------------------------------------------------------//

public OnGameModeInit()
{
    SetGameModeText("Versгo 1.0.1");
    AddPlayerClass(0, 1642.1667, -2335.4941, 13.5469, 7.6790, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    DOF2_Exit();
    return 1;
}

public OnPlayerConnect(playerid)
{
    new arquivo[40];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(arquivo, 40, "Usuarios/%s.ini", name);
    if(DOF2_FileExists(arquivo))
    {
        ShowPlayerDialog(playerid, DIALOG_LOGAR, DIALOG_STYLE_PASSWORD, "Logar", "Bem vindo novamente %s/n Coloque sua senha para logar.", "Entrar", "Sair");
    }
    else
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registro", "Vocк ainda nгo estб cadastrado %s/nColoque sua senha para se registrar", "Confirmar", "Cancelar");
    }

    return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
    new arquivo[40];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME );
    format(arquivo, 40, "Usuarios/%s.ini", name);
    if(DOF2_FileExists(arquivo))
    {
        Player[playerid][Dinheiro] = GetPlayerMoney(playerid);
        DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
        DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
        DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
        DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
        DOF2_SetInt(arquivo, "Vida", Player[playerid][Vida]);
        DOF2_SaveFile();
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new arquivo[40];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(arquivo, 40, "Usuarios/%s.ini", name);
    if(dialogid == DIALOG_REGISTRO)
    {
        if(!strval(inputtext))
        {
            ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "Registro", "Por favor, digite apenas nъmeros em sua senha!\nPor favor, digite sua senha novamente para concluir seu registro!", "Confirma", "Cancelar");
            return 1;
        }
        if(!response)
        {
            Kick(playerid);
            return 1;
        }
        else
        {
            Player[playerid][Dinheiro] = GivePlayerMoney(playerid, 5000);
            Player[playerid][Vida] = SetPlayerHealth(playerid, 50);
            DOF2_SetInt(arquivo, "Senha", Player[playerid][Senha]);
            DOF2_SetInt(arquivo, "Matou", Player[playerid][Matou]);
            DOF2_SetInt(arquivo, "Morreu", Player[playerid][Morreu]);
            DOF2_SetInt(arquivo, "Dinheiro", Player[playerid][Dinheiro]);
            DOF2_SetInt(arquivo, "Vida", Player[playerid][Vida]);
            DOF2_SaveFile();

        }
    }
    if(dialogid == DIALOG_LOGAR)
    {
        if(!response)
        {
            SendClientMessage(playerid, -1, "Vocк nгo quis logar, entгo foi kickado automaticamente");
            Kick(playerid);
        }
        if(response)
        {
            new file[32];
            GetPlayerName(playerid, name, MAX_PLAYER_NAME);
            format(file,sizeof(file),"Usuarios/%s.ini", name);
            if(DOF2_FileExists(file))
            {
               if( DOF2_CheckLogin ( file , inputtext ) )
                {
                    SendClientMessage( playerid , -1 , "Logado com sucesso" );
                    return 1;
                }
                else
                {

                }
            }
        }
    }
    return 1;
}


public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply


Messages In This Thread
Me ajudem a arrumar? - by leigorm - 11.12.2012, 17:40
Re: Me ajudem a arrumar? - by Ouro - 11.12.2012, 17:44
Re: Me ajudem a arrumar? - by leigorm - 11.12.2012, 17:48
Re: Me ajudem a arrumar? - by Falcon. - 11.12.2012, 18:02
Re: Me ajudem a arrumar? - by HardWar - 11.12.2012, 18:06
Re: Me ajudem a arrumar? - by leigorm - 11.12.2012, 18:37
Re: Me ajudem a arrumar? - by HardWar - 11.12.2012, 18:39
Re: Me ajudem a arrumar? - by leigorm - 11.12.2012, 18:42
Re: Me ajudem a arrumar? - by HardWar - 11.12.2012, 18:44
Re: Me ajudem a arrumar? - by Falcon. - 11.12.2012, 18:45

Forum Jump:


Users browsing this thread: 1 Guest(s)