[DUV]Salvar contas na dini
#8

1 - Cria Uma Pasta Na Parte de Scriptfiles com Nome de : Users

2 - Pega Meu Cуdigo Tб Em Inglкs й Nгo to Afim de Traduzir Denovo Nгo meu GM JFS ^^

OnPlayerConnect :

pawn Код:
new nombre[MAX_PLAYER_NAME], archivo[256];
    GetPlayerName(playerid, nombre, sizeof(nombre));
    if (!dini_Exists(archivo))
    {
    ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0! \n{33CCFF}Choose Your preferred Password and Enjoy\n{FFFF00}This GM is Only For Studies! !", "Register", "Cancel");
    }
    else
    {
    ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Logar", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0\n{33CCFF}Make Your Login and be happy in our server", "Logar", "Cancel");
    }
OnDialogResponse :

pawn Код:
if (dialogid == Register)
      {
      new nombrejugador[MAX_PLAYER_NAME], archivo[256];
      if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0! \n{33CCFF}Choose Your preferred Password and Enjoy\n{FFFF00}This GM is Only For Studies! !", "Register", "Cancel");
      if (!response) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0! \n{33CCFF}Choose Your preferred Password and Enjoy\n{FFFF00}This GM is Only For Studies! !", "Register", "Cancel");
      GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
      format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
      dini_Create(archivo);
      dini_Set(archivo, "User", nombrejugador);
      dini_Set(archivo, "Password", inputtext);
      ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Logar", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0\n{33CCFF}Make Your Login and be happy in our server", "Logar", "Cancel");
      }
      if (dialogid == Logged)
{
    new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
    if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Logar", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Rac v1.0\n{33CCFF}Make Your Login and be happy in our server", "Logar", "Cancel");
    if (!response) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Logar", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Rac v1.0\n{33CCFF}Make Your Login and be happy in our server", "Logar", "Cancel");
    GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
    format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
    format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Password"));
    if (!strcmp (inputtext, comprobante))
    {
        Login[playerid] = 1;
    }
    else
    {
        ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Logar", "{33CCFF}Welcome to {FFFF00}JFS Drift/DM/Race v1.0\n{33CCFF}Make Your Login and be happy in our server", "Logar", "Cancel");
    }
  }
Ele Sу Salva Senha e Nick.
Podendo Editar Na Hora que Quiser !
Reply


Messages In This Thread
[DUV]Salvar contas na dini - by drigomes - 14.03.2011, 23:30
Re: [DUV]Salvar contas na dini - by JonathanFeitosa - 14.03.2011, 23:36
Re: [DUV]Salvar contas na dini - by drigomes - 14.03.2011, 23:37
Re: [DUV]Salvar contas na dini - by JonathanFeitosa - 14.03.2011, 23:42
Re: [DUV]Salvar contas na dini - by LuxurioN™ - 14.03.2011, 23:45
Re: [DUV]Salvar contas na dini - by drigomes - 15.03.2011, 00:13
Re: [DUV]Salvar contas na dini - by lmsfull - 15.03.2011, 01:00
Re: [DUV]Salvar contas na dini - by JonathanFeitosa - 15.03.2011, 10:14
Re: [DUV]Salvar contas na dini - by drigomes - 15.03.2011, 19:30
Re: [DUV]Salvar contas na dini - by JonathanFeitosa - 15.03.2011, 19:35

Forum Jump:


Users browsing this thread: 1 Guest(s)