if(dialogid == REGISTER_LOGIN)
{
if(!response) return Kick(playerid);
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, REGISTER_LOGIN, DIALOG_STYLE_INPUT, "NO INPUT DETECTED", "Please enter your password to login.", "Enter", "Quit");
return 1;
}
if(response)
{
if(!strcmp(inputtext, pInfo[playerid][pPass]))
{
INI_ParseFile(UserPath(playerid), "LoadUser", .bExtra = true, .extra = playerid);
SCM(playerid,COLOR_GREEN, "You've successfully logged in.");
return 1;
}
else
{
ShowPlayerDialog(playerid, REGISTER_LOGIN, DIALOG_STYLE_INPUT, "WRONG PASSWORD", "Please enter your password to login.", "Enter", "Quit");
return 1;
}
}
}
if(fexist(PlayerFile(playerid)))
{
ShowPlayerDialog... Login
INI_ParseFile(UserPath(playerid), "LoadUser", .bExtra = true, .extra = playerid);
} else {
ShowPlayerDialog... Register
}
1. Uh, what?
2. I've done all of that under onplayer connect which works perfectly. |
if(!strcmp(inputtext, pInfo[playerid][pPass]),false,strlen(inputtext)) { INI_ParseFile(UserPath(playerid), "LoadUser", .bExtra = true, .extra = playerid); SCM(playerid,COLOR_GREEN, "You've successfully logged in."); return 1; }
Код:
if(!strcmp(inputtext, pInfo[playerid][pPass]),false,strlen(inputtext)) { INI_ParseFile(UserPath(playerid), "LoadUser", .bExtra = true, .extra = playerid); SCM(playerid,COLOR_GREEN, "You've successfully logged in."); return 1; } |
if(!strcmp(inputtext, pInfo[playerid][pPass]),false,strlen(inputtext))
pawn Код:
I think you have not loaded or saved the password correctly also check the .ini file, is the password correctly placed on it? (whats time suck? lol) |
Bunch of children trolling is what it is.
And the passwords do write properly (hashed and unhashed). Would you like to see my saving and loading functions/callbacks? |
stock SaveUser(playerid)
{
new path[50], name[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, x, y, z);
format(path,sizeof(path), "Users/%s.ini",name);
new INI:file = INI_Open(path);
INI_SetTag(file, "Player Data");
//Writing
//general
INI_WriteInt(file,"pScore", GetPlayerScore(playerid));
INI_WriteInt(file,"pSkin", GetPlayerSkin(playerid));
//pos saving
INI_WriteFloat(file,"pLastX", x);
INI_WriteFloat(file,"pLastY", y);
INI_WriteFloat(file,"pLastZ", z);
//vehicles
INI_WriteInt(file,"pVehicleID", pInfo[playerid][pVehicleID]);
INI_WriteInt(file,"pVehicleColor1", pInfo[playerid][pVehicleColor1]);
INI_WriteInt(file,"pVehicleColor2", pInfo[playerid][pVehicleColor2]);
INI_WriteInt(file,"pVehicleRegistered", pInfo[playerid][pVehicleRegistered]);
//bizzes
INI_WriteInt(file,"pOwnedBusiness", pInfo[playerid][pOwnedBusiness]);
INI_Close(file);
return 1;
}
//
public LoadUser(playerid, name[], value[])
{
//general
INI_String("pPass", pInfo[playerid][pPass], 50);
INI_Int("pScore", pInfo[playerid][pScore]);
INI_Int("pSkin", pInfo[playerid][pSkin]);
//pos saving
INI_Float("pLastX", pInfo[playerid][pLastX]);
INI_Float("pLastY", pInfo[playerid][pLastY]);
INI_Float("pLastZ", pInfo[playerid][pLastZ]);
//vehicles
INI_Int("pVehicleID", pInfo[playerid][pVehicleID]);
INI_Int("pVehicleColor1", pInfo[playerid][pVehicleColor1]);
INI_Int("pVehicleColor2", pInfo[playerid][pVehicleColor2]);
INI_Int("pVehicleRegistered", pInfo[playerid][pVehicleRegistered]);
//bizzes
INI_Int("pOwnedBusiness", pInfo[playerid][pOwnedBusiness]);
return 1;
}