12.11.2016, 12:30
Bem o seguinte tenho um sistema de registro e quero tipo ao registrar ele confirma tipo "Digite sua senha para se registrar", depois que digitou "Confirme sua senha!"
if(dialogid == D_REGISTRO) { if(!response) { SendClientMessage(playerid, COR_ERRO, "Vocк cancelou o registro e foi kickado!"); Kick(playerid); return 1; } if(!strlen(inputtext) || strlen(inputtext) > 30) { SendClientMessage(playerid, COR_ERRO, "Senha fora do padrгo! (Mнnimo de caracteres: {0000FF}3 - {FFFFFF}Mбximo: {0000FF}30)"); format(s5Doze, sizeof(s5Doze), "{FFFFFF}Bem-vindo(a) ao {FAEBD7}Brasil Fire Street RPG{FFFFFF}\n\nConta: %s\nStatus: {FF0000}Nгo registrada{FFFFFF}\n\nVersгo 1.0 - Nгo hб notнcias, fique atento ao fуrum!\n* Insira sua senha abaixo para registrar-se:\n> {FF0000}OBS: {FFFFFF}Por seguranзa, jamais compartilhe sua senha!", PlayerName(playerid)); ShowPlayerDialog(playerid, D_REGISTRO, DIALOG_STYLE_PASSWORD, "{FFFFFF} {FFFFFF}Brasil Fire Street RPG", s5Doze, "Registrar", "Cancelar"); return 0; } if(!fexist(gFile)) { DOF2_CreateFile(gFile); DOF2_SetInt(gFile, "Senha", pass_hash(inputtext)); DOF2_SetString(gFile, "Email", "BFS"); DOF2_SetInt(gFile, "Dinheiro", 500); DOF2_SetInt(gFile, "ContaBanco", 0); DOF2_SetInt(gFile, "SaldoBanco", 0); DOF2_SetInt(gFile, "Profissao", DESEMPREGADO); DOF2_SetInt(gFile, "Skin", 137); DOF2_SetInt(gFile, "Sexo", -1); DOF2_SetInt(gFile, "Exp", 0); DOF2_SetInt(gFile, "Level", 0); DOF2_SetInt(gFile, "SegUP", 59); DOF2_SetInt(gFile, "MinUP", 4); DOF2_SetInt(gFile, "AdminL", 0); DOF2_SetInt(gFile, "Gasolina", 30); DOF2_SetInt(gFile, "Diesel", 30); DOF2_SetInt(gFile, "MoedaCash", 0); DOF2_SetInt(gFile, "Etanol", 30); DOF2_SetInt(gFile, "HabTCarro", 0); DOF2_SetInt(gFile, "HabTMoto", 0); DOF2_SetInt(gFile, "HabTCaminhao", 0); DOF2_SetInt(gFile, "HabTTrem", 0); DOF2_SetInt(gFile, "HabNBarco", 0); DOF2_SetInt(gFile, "HabAHeli", 0); DOF2_SetInt(gFile, "HabAAviao", 0); DOF2_SetInt(gFile, "HabP", 0); DOF2_SetInt(gFile, "Spawn", 0); DOF2_SetInt(gFile, "Luta", FIGHT_STYLE_NORMAL); DOF2_SetInt(gFile, "Procurado", 0); DOF2_SetInt(gFile, "Preso", 0); DOF2_SetInt(gFile, "Casa", -1); DOF2_SetInt(gFile, "T_Cocaina", 0); DOF2_SetInt(gFile, "T_Maconha", 0); DOF2_SetInt(gFile, "T_Crack", 0); DOF2_SetInt(gFile, "P_Cocaina", 0); DOF2_SetInt(gFile, "P_Maconha", 0); DOF2_SetInt(gFile, "P_Crack", 0); DOF2_SetInt(gFile, "TCarro", 0); DOF2_SetInt(gFile, "CarroID1", 0); DOF2_SetInt(gFile, "CarroID2", 0); DOF2_SetInt(gFile, "CarroID3", 0); DOF2_SetInt(gFile, "CarroID4", 0); DOF2_SetInt(gFile, "CarroID5", 0); DOF2_SetInt(gFile, "Fotos", 0); DOF2_SetInt(gFile, "Caca", 0); DOF2_SetInt(gFile, "Peixes", 0); DOF2_SetInt(gFile, "Tem_GPS", 0); DOF2_SetInt(gFile, "Tem_RelogioUP", 1); DOF2_SetInt(gFile, "KXenon", 0); DOF2_SetInt(gFile, "RelogioONOFF", 1); DOF2_SetInt(gFile, "Tem_Velocimetro", 1); DOF2_SetInt(gFile, "Velo_ON_OFF", 1); DOF2_SetInt(gFile, "Tem_Cura", 0); DOF2_SetInt(gFile, "Kit", 0); DOF2_SetInt(gFile, "Administrador", 0); DOF2_SetInt(gFile, "Moderador", 0); DOF2_SetInt(gFile, "Ajudante", 0); DOF2_SetInt(gFile, "Corregedor", 0); DOF2_SetInt(gFile, "Banido", 0); DOF2_SetInt(gFile, "Tem_Capact", 0); DOF2_SetInt(gFile, "MorandoID", -1); DOF2_SetInt(gFile, "Seguro", 0); DOF2_SetInt(gFile, "Convenio", 0); DOF2_SetInt(gFile, "Lider", 0); DOF2_SetInt(gFile, "SubLider", 0); DOF2_SetInt(gFile, "Membro", 0); DOF2_SetFloat(gFile, "Vida", 100.0); DOF2_SetInt(gFile, "Registrado", 0); DOF2_SetString(gFile, "CasadoCom", "Ninguйm"); DOF2_SetInt(gFile, "Casado", 0); DOF2_SetInt(gFile, "SkPistol", 1); DOF2_SetInt(gFile, "SkShotgun", 1); DOF2_SetInt(gFile, "SkMicro", 1); DOF2_SetInt(gFile, "SkMP5", 1); DOF2_SetInt(gFile, "SkRifle", 1); DOF2_SetInt(gFile, "SkSniper", 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1); dataRegistro(playerid); ultimoLogin(playerid); pInfo[playerid][Continuar] = false; pInfo[playerid][Logado] = true; format(s5Doze, sizeof(s5Doze), "{FFFFFF}E-mail para recuperaзгo de conta para prevenзхes futuras.\n\nDigite um e-mail vбlido e ativo e ativo:", PlayerName(playerid)); ShowPlayerDialog(playerid, D_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}E-mail para recuperaзгo.", s5Doze, "Salvar", ""); } return 1; }
if(dialogid == D_REGISTRO) { if(!response) { SendClientMessage(playerid, COR_ERRO, "Vocк cancelou o registro e foi kickado!"); Kick(playerid); return 1; } if(!strlen(inputtext) || strlen(inputtext) > 30) { SendClientMessage(playerid, COR_ERRO, "Senha fora do padrгo! (Mнnimo de caracteres: {0000FF}3 - {FFFFFF}Mбximo: {0000FF}30)"); format(s5Doze, sizeof(s5Doze), "{FFFFFF}Bem-vindo(a) ao {FAEBD7}Brasil Fire Street RPG{FFFFFF}\n\nConta: %s\nStatus: {FF0000}Nгo registrada{FFFFFF}\n\nVersгo 1.0 - Nгo hб notнcias, fique atento ao fуrum!\n* Insira sua senha abaixo para registrar-se:\n> {FF0000}OBS: {FFFFFF}Por seguranзa, jamais compartilhe sua senha!", PlayerName(playerid)); ShowPlayerDialog(playerid, D_REGISTRO, DIALOG_STYLE_PASSWORD, "{FFFFFF} {FFFFFF}Brasil Fire Street RPG", s5Doze, "Registrar", "Cancelar"); return 0; } //--------------------- deleta isso ------------------------ /*if(!fexist(gFile)) { DOF2_CreateFile(gFile); DOF2_SetInt(gFile, "Senha", pass_hash(inputtext)); DOF2_SetString(gFile, "Email", "BFS"); DOF2_SetInt(gFile, "Dinheiro", 500); DOF2_SetInt(gFile, "ContaBanco", 0); DOF2_SetInt(gFile, "SaldoBanco", 0); DOF2_SetInt(gFile, "Profissao", DESEMPREGADO); DOF2_SetInt(gFile, "Skin", 137); DOF2_SetInt(gFile, "Sexo", -1); DOF2_SetInt(gFile, "Exp", 0); DOF2_SetInt(gFile, "Level", 0); DOF2_SetInt(gFile, "SegUP", 59); DOF2_SetInt(gFile, "MinUP", 4); DOF2_SetInt(gFile, "AdminL", 0); DOF2_SetInt(gFile, "Gasolina", 30); DOF2_SetInt(gFile, "Diesel", 30); DOF2_SetInt(gFile, "MoedaCash", 0); DOF2_SetInt(gFile, "Etanol", 30); DOF2_SetInt(gFile, "HabTCarro", 0); DOF2_SetInt(gFile, "HabTMoto", 0); DOF2_SetInt(gFile, "HabTCaminhao", 0); DOF2_SetInt(gFile, "HabTTrem", 0); DOF2_SetInt(gFile, "HabNBarco", 0); DOF2_SetInt(gFile, "HabAHeli", 0); DOF2_SetInt(gFile, "HabAAviao", 0); DOF2_SetInt(gFile, "HabP", 0); DOF2_SetInt(gFile, "Spawn", 0); DOF2_SetInt(gFile, "Luta", FIGHT_STYLE_NORMAL); DOF2_SetInt(gFile, "Procurado", 0); DOF2_SetInt(gFile, "Preso", 0); DOF2_SetInt(gFile, "Casa", -1); DOF2_SetInt(gFile, "T_Cocaina", 0); DOF2_SetInt(gFile, "T_Maconha", 0); DOF2_SetInt(gFile, "T_Crack", 0); DOF2_SetInt(gFile, "P_Cocaina", 0); DOF2_SetInt(gFile, "P_Maconha", 0); DOF2_SetInt(gFile, "P_Crack", 0); DOF2_SetInt(gFile, "TCarro", 0); DOF2_SetInt(gFile, "CarroID1", 0); DOF2_SetInt(gFile, "CarroID2", 0); DOF2_SetInt(gFile, "CarroID3", 0); DOF2_SetInt(gFile, "CarroID4", 0); DOF2_SetInt(gFile, "CarroID5", 0); DOF2_SetInt(gFile, "Fotos", 0); DOF2_SetInt(gFile, "Caca", 0); DOF2_SetInt(gFile, "Peixes", 0); DOF2_SetInt(gFile, "Tem_GPS", 0); DOF2_SetInt(gFile, "Tem_RelogioUP", 1); DOF2_SetInt(gFile, "KXenon", 0); DOF2_SetInt(gFile, "RelogioONOFF", 1); DOF2_SetInt(gFile, "Tem_Velocimetro", 1); DOF2_SetInt(gFile, "Velo_ON_OFF", 1); DOF2_SetInt(gFile, "Tem_Cura", 0); DOF2_SetInt(gFile, "Kit", 0); DOF2_SetInt(gFile, "Administrador", 0); DOF2_SetInt(gFile, "Moderador", 0); DOF2_SetInt(gFile, "Ajudante", 0); DOF2_SetInt(gFile, "Corregedor", 0); DOF2_SetInt(gFile, "Banido", 0); DOF2_SetInt(gFile, "Tem_Capact", 0); DOF2_SetInt(gFile, "MorandoID", -1); DOF2_SetInt(gFile, "Seguro", 0); DOF2_SetInt(gFile, "Convenio", 0); DOF2_SetInt(gFile, "Lider", 0); DOF2_SetInt(gFile, "SubLider", 0); DOF2_SetInt(gFile, "Membro", 0); DOF2_SetFloat(gFile, "Vida", 100.0); DOF2_SetInt(gFile, "Registrado", 0); DOF2_SetString(gFile, "CasadoCom", "Ninguйm"); DOF2_SetInt(gFile, "Casado", 0); DOF2_SetInt(gFile, "SkPistol", 1); DOF2_SetInt(gFile, "SkShotgun", 1); DOF2_SetInt(gFile, "SkMicro", 1); DOF2_SetInt(gFile, "SkMP5", 1); DOF2_SetInt(gFile, "SkRifle", 1); DOF2_SetInt(gFile, "SkSniper", 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1); dataRegistro(playerid); ultimoLogin(playerid); pInfo[playerid][Continuar] = false; pInfo[playerid][Logado] = true;*/ //---------- atй aqui ----------------- ShowPlayerDialog(playerid, 962, DIALOG_STYLE_INPUT, "{FFFFFF}Confirme sua senha.", "Digite novamente sua senha aqui!", "Confirmar", ""); // mudei isso } return 1; }
if(dialogid == 962) { if(!response) { // use como na dialog de login para qnd acertar a senha ( nгo sei os parametros e local do arquivo ) dai continua para a dialog do email, se nгo volta pra dialog de senha D_REGISTRO // Se acertar a senha.. if(!fexist(gFile)) { DOF2_CreateFile(gFile); DOF2_SetInt(gFile, "Senha", pass_hash(inputtext)); DOF2_SetString(gFile, "Email", "BFS"); DOF2_SetInt(gFile, "Dinheiro", 500); DOF2_SetInt(gFile, "ContaBanco", 0); DOF2_SetInt(gFile, "SaldoBanco", 0); DOF2_SetInt(gFile, "Profissao", DESEMPREGADO); DOF2_SetInt(gFile, "Skin", 137); DOF2_SetInt(gFile, "Sexo", -1); DOF2_SetInt(gFile, "Exp", 0); DOF2_SetInt(gFile, "Level", 0); DOF2_SetInt(gFile, "SegUP", 59); DOF2_SetInt(gFile, "MinUP", 4); DOF2_SetInt(gFile, "AdminL", 0); DOF2_SetInt(gFile, "Gasolina", 30); DOF2_SetInt(gFile, "Diesel", 30); DOF2_SetInt(gFile, "MoedaCash", 0); DOF2_SetInt(gFile, "Etanol", 30); DOF2_SetInt(gFile, "HabTCarro", 0); DOF2_SetInt(gFile, "HabTMoto", 0); DOF2_SetInt(gFile, "HabTCaminhao", 0); DOF2_SetInt(gFile, "HabTTrem", 0); DOF2_SetInt(gFile, "HabNBarco", 0); DOF2_SetInt(gFile, "HabAHeli", 0); DOF2_SetInt(gFile, "HabAAviao", 0); DOF2_SetInt(gFile, "HabP", 0); DOF2_SetInt(gFile, "Spawn", 0); DOF2_SetInt(gFile, "Luta", FIGHT_STYLE_NORMAL); DOF2_SetInt(gFile, "Procurado", 0); DOF2_SetInt(gFile, "Preso", 0); DOF2_SetInt(gFile, "Casa", -1); DOF2_SetInt(gFile, "T_Cocaina", 0); DOF2_SetInt(gFile, "T_Maconha", 0); DOF2_SetInt(gFile, "T_Crack", 0); DOF2_SetInt(gFile, "P_Cocaina", 0); DOF2_SetInt(gFile, "P_Maconha", 0); DOF2_SetInt(gFile, "P_Crack", 0); DOF2_SetInt(gFile, "TCarro", 0); DOF2_SetInt(gFile, "CarroID1", 0); DOF2_SetInt(gFile, "CarroID2", 0); DOF2_SetInt(gFile, "CarroID3", 0); DOF2_SetInt(gFile, "CarroID4", 0); DOF2_SetInt(gFile, "CarroID5", 0); DOF2_SetInt(gFile, "Fotos", 0); DOF2_SetInt(gFile, "Caca", 0); DOF2_SetInt(gFile, "Peixes", 0); DOF2_SetInt(gFile, "Tem_GPS", 0); DOF2_SetInt(gFile, "Tem_RelogioUP", 1); DOF2_SetInt(gFile, "KXenon", 0); DOF2_SetInt(gFile, "RelogioONOFF", 1); DOF2_SetInt(gFile, "Tem_Velocimetro", 1); DOF2_SetInt(gFile, "Velo_ON_OFF", 1); DOF2_SetInt(gFile, "Tem_Cura", 0); DOF2_SetInt(gFile, "Kit", 0); DOF2_SetInt(gFile, "Administrador", 0); DOF2_SetInt(gFile, "Moderador", 0); DOF2_SetInt(gFile, "Ajudante", 0); DOF2_SetInt(gFile, "Corregedor", 0); DOF2_SetInt(gFile, "Banido", 0); DOF2_SetInt(gFile, "Tem_Capact", 0); DOF2_SetInt(gFile, "MorandoID", -1); DOF2_SetInt(gFile, "Seguro", 0); DOF2_SetInt(gFile, "Convenio", 0); DOF2_SetInt(gFile, "Lider", 0); DOF2_SetInt(gFile, "SubLider", 0); DOF2_SetInt(gFile, "Membro", 0); DOF2_SetFloat(gFile, "Vida", 100.0); DOF2_SetInt(gFile, "Registrado", 0); DOF2_SetString(gFile, "CasadoCom", "Ninguйm"); DOF2_SetInt(gFile, "Casado", 0); DOF2_SetInt(gFile, "SkPistol", 1); DOF2_SetInt(gFile, "SkShotgun", 1); DOF2_SetInt(gFile, "SkMicro", 1); DOF2_SetInt(gFile, "SkMP5", 1); DOF2_SetInt(gFile, "SkRifle", 1); DOF2_SetInt(gFile, "SkSniper", 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1); SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1); dataRegistro(playerid); ultimoLogin(playerid); pInfo[playerid][Continuar] = false; pInfo[playerid][Logado] = true; // se nгo acertar coloca pra aparecer a da senha dnovo sу falando que errou a senha } else{ ShowPlayerDialog(); // a dialog da 1Є senha } }