Passwords aren't saving upon registering/logging in.
#1

Title ^

pawn Код:
if(dialogid == DIALOG_REGISTER)
{
if(response)
{
if(!strlen(inputtext))
{
format(dr1, sizeof(dr1), "Welcome to ---, %s.", plname);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD , dr1, "This account isn't registered yet. If you wish to contiune, you must register by putting in a password.", "Register", "Leave");
return 1;
}
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "users/%s.ini", plname);
new File:hFile;
new passw = strval( inputtext );
hFile = fopen(string, io_append);
new var[32];//
format(var, 32, "pPass=%s\n", passw);fwrite(hFile, var);
format(var, 32, "pAdmin=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "pSex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 32, "pSupporter=%d\n",PlayerInfo[playerid][pSupporter]);fwrite(hFile, var);
format(var, 32, "pCash=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 32, "pAge=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
format(var, 32, "pLevel=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "pTut=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "pRace=%d\n",PlayerInfo[playerid][pRace]);fwrite(hFile, var);
fclose(hFile);
gPlayerAccount[playerid] = 1;
AntiHack(playerid, 1500);
SendClientMessage(playerid, COLOR_YELLOW, "Registered, we'll now send you towards the tutorial.");
Tutorial(playerid);
OnPlayerLogin(playerid,inputtext);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You have left the server..");
Kick(playerid);
}
}
I seen something similar that a guy using ini was having the same problems, but im not sure.
Reply


Messages In This Thread
Passwords aren't saving upon registering/logging in. - by iLcke - 26.09.2012, 10:23
Re: Passwords aren't saving upon registering/logging in. - by Rimeau - 26.09.2012, 10:34
Re: Passwords aren't saving upon registering/logging in. - by iLcke - 26.09.2012, 10:59
Re: Passwords aren't saving upon registering/logging in. - by Rimeau - 26.09.2012, 11:27
Re: Passwords aren't saving upon registering/logging in. - by BrandyPenguin - 26.09.2012, 11:31

Forum Jump:


Users browsing this thread: 3 Guest(s)