[HELP] Any idea of why isnt this working? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Any idea of why isnt this working? (
/showthread.php?tid=452422)
[HELP] Any idea of why isnt this working? -
Daaviid - 21.07.2013
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.
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;
}