dini not saving
#1

pawn Код:
enum NewData
{
    winrace,
    secpos,
    trdpos,
    top3r,
    mbcollect,
};

public OnPlayerConnect(playerid)
{

//-------------------------------------------------
//New Info
//-------------------------------------------------
    format(fileZ,sizeof(fileZ),"LuxAdmin/NewInfo/%s.ini",GetName(playerid));
    if(!fexist(fileZ))
    {
            dini_Create(fileZ);
            dini_IntSet(fileZ, "winrace", 0);
            dini_IntSet(fileZ,"secpos", 0);
            dini_IntSet(fileZ,"trdpos", 0);
            dini_IntSet(fileZ,"top3r", 0);
            dini_IntSet(fileZ,"mbcollect", 0);

    }
return 1;
}

public OnPlayerSpawn(playerid)
{
//-------------------------------------------------
//New Info
//-------------------------------------------------
    NewInfo[playerid][winrace] = dini_Int(fileZ, "winrace");
    NewInfo[playerid][secpos] = dini_Int(fileZ, "secpos");
    NewInfo[playerid][trdpos] = dini_Int(fileZ, "trdpos");
    NewInfo[playerid][top3r] = dini_Int(fileZ, "top3r");
    NewInfo[playerid][mbcollect] = dini_Int(fileZ, "mbcollect");
return 1;
}

SavePlayerStats(playerid)
{
    dUserSetINT(PlayerName2(playerid)).("mbcollect",NewInfo[playerid][mbcollect]);
}

public OnPlayerDisconnect(playerid, reason)
{
SavePlayerStats(playerid);
return 1;
}

//At random place
NewInfo[playerid][mbcollect]++;
Still on every quit files remain;
Код:
winrace=0
secpos=0
trdpos=0
top3r=0
mbcollect=0
Reply


Messages In This Thread
dini not saving - by MA_proking - 21.02.2012, 11:38
Re: dini not saving - by Konstantinos - 21.02.2012, 11:42
Re: dini not saving - by MA_proking - 21.02.2012, 11:44
Re: dini not saving - by Konstantinos - 21.02.2012, 11:52
Re: dini not saving - by MA_proking - 21.02.2012, 12:37

Forum Jump:


Users browsing this thread: 1 Guest(s)