Stats are not saving (y ini)
#1

For some reason my stats are not saving?

Enum:

Код:
enum PlayerInfo
{
    Pass[129],
    Admin,
    VIP,
    Cash,
    Bank,
    Level,
    Kills,
    Deaths
}
new pInfo[MAX_PLAYERS][PlayerInfo];
on player disc:

Код:
public OnPlayerDisconnect(playerid, reason)
{
		new INI:file = INI_Open(Path(playerid));
	    INI_SetTag(file,"Player's Data");
	 	INI_WriteInt(file,"Admin",pInfo[playerid][Admin]);
		INI_WriteInt(file,"VIP",pInfo[playerid][VIP]);
		INI_WriteInt(file,"Cash",pInfo[playerid][Cash]);
		INI_WriteInt(file,"Bank",pInfo[playerid][Bank]);
		INI_WriteInt(file,"Level",pInfo[playerid][Level]);
		INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
		INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
		INI_Close(file);
	return 1;
}
Код:
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("Admin",pInfo[playerid][Admin]);
    INI_Int("VIP",pInfo[playerid][VIP]);
    INI_Int("Cash",pInfo[playerid][Cash]);
    INI_Int("Bank",pInfo[playerid][Bank]);
    INI_Int("Level",pInfo[playerid][Level]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    return 1;
}
Reply


Messages In This Thread
Stats are not saving (y ini) - by Sellize - 18.02.2015, 16:01
Re: Stats are not saving (y ini) - by GGRoleplay - 18.02.2015, 16:03
Re: Stats are not saving (y ini) - by Sellize - 18.02.2015, 16:10
Re: Stats are not saving (y ini) - by rockhopper - 18.02.2015, 16:17
Re: Stats are not saving (y ini) - by DaniceMcHarley - 18.02.2015, 16:56
Re: Stats are not saving (y ini) - by Sellize - 18.02.2015, 17:22
Re: Stats are not saving (y ini) - by Sellize - 19.02.2015, 14:19

Forum Jump:


Users browsing this thread: 2 Guest(s)