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 !