24.07.2014, 11:34
(
Последний раз редактировалось Don_Cage; 01.10.2014 в 16:09.
)
.....
Does it have you authenticate a new account, or does it just overwrite the previously existing account?
|
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;
}
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. pawn Код:
|
if(dialogid == dialog_Register)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return SPD(playerid, dialog_Register, DIALOG_STYLE_INPUT, "Authenticate", "Please enter a password below in order to register.", "Register", "Quit");
new playersip[24];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
GetPlayerIp(playerid, playersip, sizeof(playersip));
WP_Hash(hashpass, sizeof(hashpass), inputtext);
PlayerInfo[playerid][Pass] = hashpass;
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pArmour] = 0.0;
PlayerInfo[playerid][pCash] = 0;
new y,m,d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d) [%d:%d:%d] %s Has registred in under IP %s.",d,m,y,h,mi,s,playername3,playersip);
PlayerInfo[playerid][pReg] = 0;
LoginLog(string);
format(sHolder, sizeof(sHolder), "None");
SavePlayer(playerid);
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
gPlayerLogged[playerid] = true;
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
ShowModelSelectionMenu(playerid, skinlistregister, "Please, choose your clothes.");
SafeSetPlayerPos(playerid, -1424.2418,-291.0264,14.1484);
SCM(playerid, COLOR_LIGHTRED, "Thank You for registering at {157DEC}blabla{FF6347}.");
SetPlayerFacingAngle(playerid, 290);
return true;
}
}