if(dialogid == DIALOG_REGISTRO)
{
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Vocк cancelou o seu registro.");
KickEx(playerid);
return 1;
}
if(!strlen(inputtext) || strlen(inputtext) > 24)
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Sua senha deve ter entre 3 e 24 caracteres.");
format(String, sizeof(String), "{ffffff}Olб %s bem vindo\n\n{ffffff}Versгo 0.4\nStatus: {ff0000}Nгo registrado", PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "{FF8000}Perfect {3af31c}City {1cb9f3}RPG", String, "Cadastrar", "Sair");
return 0;
}
if(DOF2_FileExists(file))
{
DOF2_CreateFile(file);
DOF2_SetInt(file, "Senha", encrypt(inputtext));
DOF2_SetInt(file, "Grana", 1000);
DOF2_SetInt(file, "Skin", 48);
DOF2_SetInt(file, "Level", 0);
DOF2_SetInt(file, "EXP", 0);
DOF2_SetInt(file, "Admin", 0);
DOF2_SetInt(file, "minUP", 5);
DOF2_SetInt(file, "segUP", 59);
DOF2_SetInt(file, "Gasolina", 20);
DOF2_SetInt(file, "Diesel", 25);
DOF2_SetInt(file, "Etanol", 20);
DOF2_SetInt(file, "Gas", 10);
DOF2_SetInt(file, "AvGas", 50);
DOF2_SetInt(file, "Preso Adm", 0);
DOF2_SetInt(file, "Preso", 0);
DOF2_SetInt(file, "Banido", 0);
DOF2_SetInt(file, "Profissao", Desempregado);
DOF2_SetInt(file, "VIP", 0);
DOF2_SaveFile();
SendClientMessage(playerid, 0x0080FFAA, "| PC - REGISTRO | Seus dados foram criados com sucesso!");
format(String, sizeof(String),"{ffffff}Olб %s bem vindo\n\n{ffffff}Versгo 0.4\nStatus: {00ff00}Registrado\n\n{ffffff}www.embreve.com.br",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF8000}Perfect {3af31c}City {1cb9f3}RPG", String, "Logar", "Sair");
}
return 1;
}
new aname[MAX_PLAYER_NAME], file[80];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), "Contas/%s.ini", aname);
if(!DOF2_FileExists(file))
if(dialogid == DIALOG_REGISTRO)
{
new aname[MAX_PLAYER_NAME], file[80];
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), "Contas/%s.ini", aname);
if(!response)
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Vocк cancelou o seu registro.");
KickEx(playerid);
return 1;
}
if(!strlen(inputtext) || strlen(inputtext) > 24)
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Sua senha deve ter entre 3 e 24 caracteres.");
format(String, sizeof(String), "{ffffff}Olб %s bem vindo\n\n{ffffff}Versгo 0.4\nStatus: {ff0000}Nгo registrado", PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "{FF8000}Perfect {3af31c}City {1cb9f3}RPG", String, "Cadastrar", "Sair");
return 0;
}
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
DOF2_SetInt(file, "Senha", encrypt(inputtext));
DOF2_SetInt(file, "Grana", 1000);
DOF2_SetInt(file, "Skin", 48);
DOF2_SetInt(file, "Level", 0);
DOF2_SetInt(file, "EXP", 0);
DOF2_SetInt(file, "Admin", 0);
DOF2_SetInt(file, "minUP", 5);
DOF2_SetInt(file, "segUP", 59);
DOF2_SetInt(file, "Gasolina", 20);
DOF2_SetInt(file, "Diesel", 25);
DOF2_SetInt(file, "Etanol", 20);
DOF2_SetInt(file, "Gas", 10);
DOF2_SetInt(file, "AvGas", 50);
DOF2_SetInt(file, "Preso Adm", 0);
DOF2_SetInt(file, "Preso", 0);
DOF2_SetInt(file, "Banido", 0);
DOF2_SetInt(file, "Profissao", Desempregado);
DOF2_SetInt(file, "VIP", 0);
DOF2_SaveFile();
SendClientMessage(playerid, 0x0080FFAA, "| PC - REGISTRO | Seus dados foram criados com sucesso!");
format(String, sizeof(String),"{ffffff}Olб %s bem vindo\n\n{ffffff}Versгo 0.4\nStatus: {00ff00}Registrado\n\n{ffffff}www.embreve.com.br",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "{FF8000}Perfect {3af31c}City {1cb9f3}RPG", String, "Logar", "Sair");
}
return 1;
}
PHP Code:
PHP Code:
|