21.07.2013, 11:59
I decide to download an admin system (supossed to have no bugs -.-'').
So this is not saving the security answer. When you fail at login and the system ask you for it,
anybody can login even with nothing wrote! So i check the users account and the variable "QuestionR" (answer) its not saving! It uses dini between.
I have change such a bunch of shit and still not work, any idea please?
Otherwise i will have to remove it.
So this is not saving the security answer. When you fail at login and the system ask you for it,
anybody can login even with nothing wrote! So i check the users account and the variable "QuestionR" (answer) its not saving! It uses dini between.
I have change such a bunch of shit and still not work, any idea please?
Otherwise i will have to remove it.
pawn Код:
if (dialogid == DIALOG_TYPE_QUESTION+1)
{
if(response == 0)
{
AccInfo[playerid][NoQuestion] = dUserSetINT(PlayerName2(playerid)).("NoQuestion",1);
}
if(response)
{
new file[256],name[MAX_PLAYER_NAME];
if(strlen(inputtext) < 1 || strlen(inputtext) > 40)
{
new rstring[256];
format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(name));
GetPlayerName(playerid,name,sizeof(name));
new tmp[256];
dini_Get(file,"Question");
AccInfo[playerid][NoQuestion] = dUserSetINT(PlayerName2(playerid)).("NoQuestion",0);
format(rstring,256,"Your security question answer:\n\n \"%s\"",tmp);
return ShowPlayerDialog(playerid,DIALOG_TYPE_QUESTION+1,DIALOG_STYLE_INPUT,"Security Question - ANSWER",rstring,"Acept","Cancel");
}
new fileans[256],nameans[MAX_PLAYER_NAME];
format(fileans,sizeof(fileans),"/LuxAdmin/Accounts/%s.sav",udb_encode(nameans));
GetPlayerName(playerid,nameans,sizeof(nameans));
dini_Set(file,"QuestionR",inputtext);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
return 1;
}