Beleza consegui, mais agora, ele ta salvando a senha como (null) com dof2.
Eu sei que o erro estб aqui, mais nгo sei outra forma de pegar a string..
Cуdigo:
pawn Код:
new SenhaRegistro[MAX_PLAYERS];
if( dialogid == DIALOG_LOGARC2 )
{
if( response )
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, DIALOG_LOGARC2, DIALOG_STYLE_INPUT, "{FFFF00}Insira sua {00FF00}senha", "{FFFFFF}Digite sua senha abaixo:", "Pronto", "");
GameTextForPlayer(playerid, "~r~~h~~h~Digite uma senha!", 3200, 6);
Msg(playerid, -1, "{FF0000}[ERRO]: {FFFFFF}Digite uma senha!");
return 1;
}
SenhaRegistro[playerid] = strval(inputtext);
TextDrawSetString(LoginPanel7[playerid], SenhaRegistro[playerid]);
TextDrawShowForPlayer(playerid, LoginPanel7[playerid]);
senhaCorreta[playerid] = true;
return 1;
}
}
if(clickedid == LoginPanel18[playerid])
{
format(StringContas, sizeof(StringContas), "LLADMIN/Contas/%s.txt", Nome(playerid));
if(DOF2_FileExists(StringContas)) return Msg(playerid, -1, "{FF0000}[ERRO]: {FFFFFF}Vocк jб tem uma conta, por favor logue-se!"), 0;
if(senhaCorreta[playerid] == false)
{
Msg(playerid, -1, "{FF0000}[ERRO]: {FFFFFF}Vocк ainda nгo se registrou, por favor insira a senha no campo acima!");
} else {
format(StringContas, sizeof(StringContas), "LLADMIN/Contas/%s.txt", Nome(playerid));
DOF2_CreateFile(StringContas);
DOF2_SetString(StringContas, "Senha", SenhaRegistro[playerid]);
DOF2_SetInt(StringContas, "Matou", 0);
DOF2_SetInt(StringContas, "Morreu", 0);
DOF2_SetInt(StringContas, "Grana", 0);
DOF2_SetInt(StringContas, "Score", 0);
DOF2_SetInt(StringContas, "Level", 0);
DOF2_SetInt(StringContas, "Experiencia", 0);
DOF2_SetInt(StringContas, "Advertencias", 0);
DOF2_SetInt(StringContas, "Preso", 0);
DOF2_SetInt(StringContas, "Acertos", 0);
DOF2_SetInt(StringContas, "Danos", 0);
DOF2_SetInt(StringContas, "X1 Ganhos", 0);
PlayerDados[playerid][Logado] = true;
SendClientMessage(playerid, amarelo, "[INFO]: {FFFFFF}Registrado Com Sucesso! Vocк foi logado automaticamente");
GameTextForPlayer(playerid, "~g~~h~~h~registrado ~w~!", 4000, 5);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 500000);
SetPlayerScore(playerid, 10);
TextDrawHideForPlayer(playerid, ImagemEntrada);
GivePlayerMoney(playerid, 500000);
OnPlayerRequestClass(playerid);
HideLoginPanel(playerid);
#if USAR_TEXT == 1
TextDrawDestroy(Inicio[playerid]);
#endif
return 1;
}
}
Como eu disse nгo sei outra forma de pegar a string do inputtext..
O problema ta nessa linha:
pawn Код:
DOF2_SetString(StringContas, "Senha", SenhaRegistro[playerid]);