25.07.2014, 09:28
When you register, does a ini file appear in the directory of your users folder?
I think its something to do with creating the file other than it not loading since it has nothing to load. When you re-connect your variables for that playerid will remain the same unless you reset the variable therefore when your server restarts the data get reset.
Add this above the registration/ login system then tell me the results when you relog.
You got any code that you could support us when the player registers? That may be the problem, apart from that I had a good look at your code and it all seems to be in a working order!
I think its something to do with creating the file other than it not loading since it has nothing to load. When you re-connect your variables for that playerid will remain the same unless you reset the variable therefore when your server restarts the data get reset.
Add this above the registration/ login system then tell me the results when you relog.
pawn Код:
public OnPlayerConnect(playerid)
{
format(PlayerInfo[playerid][Pass], 3, " ");
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pLevel] = 0;
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "loadaccount_%s", .bExtra = true, .extra = playerid);
SPD(playerid, dialog_Login, DIALOG_STYLE_PASSWORD, "Authenticate", "Please enter a password below in order to log in.", "Login", "Quit");
}
else return SPD(playerid, dialog_Register, DIALOG_STYLE_INPUT, "Authenticate", "Please enter a password below in order to register.", "Register", "Quit");
return true;
}