help score/money not saving to file
#2

Try this:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid,name,sizeof(name));
    format(file,sizeof(file),"Admin/Accounts/%s.txt",name);
   
    new pScore, pMoney;
    pScore = GetPlayerScore(playerid);
    pMoney = GetPlayerMoney(playerid);
   
    if(dini_Exists(file))
    {
        dini_IntSet(file,"LoggedIn",0);
        dini_IntSet(file, "Score", pScore);
        dini_IntSet(file, "Money", pMoney);
        dini_IntSet(file, "VIP", pInfo[playerid][VIP]);
        dini_IntSet(file, "Level", pInfo[playerid][Level]);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
help score/money not saving to file - by YungGee - 04.02.2011, 12:16
Re: help score/money not saving to file - by xRyder - 04.02.2011, 12:23
Re: help score/money not saving to file - by HyperZ - 04.02.2011, 12:32

Forum Jump:


Users browsing this thread: 2 Guest(s)