[Help]Problem With Account System
#1

Hi SA:MP Community !
I'm using Y_INI to save player data !
nowadays i have a problem.
a player register and leave server ... after if a player join server , system load the last person who registered !
e.g. server runned !
someone join the server by " Player1 " Nick and register by 123 password !
after leave Player1 if someone that registered before join the server, server say : your password is incorrect beCause system loaded Player1 data and expects enter 123 to login !!
everywhere that i used INI_Open , after writing files , i Closed it !


pawn Код:
// My Load Function
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("BankCash",PlayerInfo[playerid][pBankCash]);
    INI_Int("HaveATM",PlayerInfo[playerid][pHaveATM]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Vip",PlayerInfo[playerid][pVip]);
    INI_Int("AdminExpire",PlayerInfo[playerid][pAdminExpireTime]);
    INI_Int("VipExpire",PlayerInfo[playerid][pVipExpireTime]);
    INI_Int("Respect",PlayerInfo[playerid][pRespect]);
    INI_Int("Playtime",PlayerInfo[playerid][pTime]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Int("TempBanned",PlayerInfo[playerid][pTempBanned]);
    INI_Int("TempBanTime",PlayerInfo[playerid][pTempBanTime]);
    INI_Int("POC",PlayerInfo[playerid][pPOC]);
    INI_Int("Bombs",PlayerInfo[playerid][pBombs]);
    INI_Int("Reports",PlayerInfo[playerid][pReports]);
    INI_Int("Wanted",PlayerInfo[playerid][pWanted]);
    INI_Int("Zone",PlayerInfo[playerid][pZone]);
    INI_Int("Weed",PlayerInfo[playerid][pWeed]);
    INI_String("Email",PlayerInfo[playerid][pEmail],64);
    INI_Int("Jailed",PlayerInfo[playerid][pJailed]);
    INI_Int("JailTime",PlayerInfo[playerid][pJailTime]);
    INI_Int("PolicePunish",PlayerInfo[playerid][pPolicePunish]);
    INI_Int("CanPolice",PlayerInfo[playerid][pCanPolice]);
    INI_Int("TeamID",PlayerInfo[playerid][pTeamID]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("NameTag",PlayerInfo[playerid][pNameTag]);
    INI_String("DeathPM",PlayerInfo[playerid][pDeathPM],32);
    INI_String("Banreason",PlayerInfo[playerid][pBanreason],64);
    INI_Float( "LastX",PlayerInfo[playerid][pLastX]);
        INI_Float( "LastY",PlayerInfo[playerid][pLastY]);
        INI_Float( "LastZ",PlayerInfo[playerid][pLastZ]);
    INI_Int("LastInterior",PlayerInfo[playerid][pLastInterior]);
    INI_Int("LastVW",PlayerInfo[playerid][pLastVW]);
    INI_Int("PDETimeLimit",PlayerInfo[playerid][pPDETimeLimit]);
    return 1;
}

// My PATH And Stock >>

#define PATH "/Users/%s.ini"

stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}

Please Help Me !
Thank you !
Reply


Messages In This Thread
[Help]Problem With Account System - by Mamal75 - 09.10.2014, 11:30
Re: [Help]Problem With Account System - by Rudy_ - 09.10.2014, 11:44
Re: [Help]Problem With Account System - by Mamal75 - 09.10.2014, 11:56
Re: [Help]Problem With Account System - by Rudy_ - 09.10.2014, 11:59
Re: [Help]Problem With Account System - by Mamal75 - 09.10.2014, 19:41
Re: [Help]Problem With Account System - by Mamal75 - 10.10.2014, 07:34
Re: [Help]Problem With Account System - by PMH - 10.10.2014, 08:17
Re: [Help]Problem With Account System - by Rudy_ - 10.10.2014, 11:18
Re: [Help]Problem With Account System - by Mamal75 - 10.10.2014, 11:53

Forum Jump:


Users browsing this thread: 2 Guest(s)