new UserAccount[45]; format(UserAccount, sizeof(UserAccount), UserAccFile, PlayerName(playerid)); INI_ParseFile(UserAccount, "UserAccount_%s_%s"); SetPVarInt(playerid, "IsLogged", 0); if(strcmp(inputtext, PInfoA[playerid][pPassword], false, 16)) // Can't use sizeof { SetPVarInt(playerid, "IsLogged", 1); //print(PInfoA[playerid][pPassword]); print("User loggedIn"); } else { SetPVarInt(playerid, "MaxLoginTry", GetPVarInt(playerid, "MaxLoginTry")+1); ShowPlayerDialog(playerid, DIALOG_LOGIN, DSP, "Auth", "Wrong pass!\nВWrite pass:", "Join", ""); }
forward UserAccount_Account_UserAccount(playerid, name[], value[]); public UserAccount_Account_UserAccount(playerid, name[], value[]) { INI_String("Password", PInfoA[playerid][pPassword], 16); // sizeof error INI_Int("Team", PInfoA[playerid][pTeam]); INI_Int("Level", PInfoA[playerid][pLvl]); INI_Int("Exp", PInfoA[playerid][pExp]); print("UserAccount loader"); return 1; }
INI_ParseFile(GetAccountPath(playerid), "UserAccount_%s", .bExtra = true, .extra = playerid); |