creating a file with yini?
#3

Like this?

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new name[MAX_PLAYER_NAME], playerfile[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(playerfile, sizeof(playerfile), "%s.ini", name);
    {
        new INI:file = INI_Open(playerfile);
        new Float:health, Float:armour;
        gPlayerInfo[playerid][pLevel] = GetPlayerScore(playerid);
        INI_WriteInt(file, "Level", gPlayerInfo[playerid][pLevel]);
        gPlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
        INI_WriteInt(file, "Money", gPlayerInfo[playerid][pMoney]);
        gPlayerInfo[playerid][pHealth] = GetPlayerHealth(playerid, health);
        INI_WriteFloat(file, "Health", gPlayerInfo[playerid][pHealth]);
        gPlayerInfo[playerid][pArmour] = GetPlayerArmour(playerid, armour);
        INI_WriteFloat(file, "Armour", gPlayerInfo[playerid][pArmour]);
        gPlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
        INI_WriteInt(file, "Skin", gPlayerInfo[playerid][pSkin]);
        INI_Close(file);
    }
    return 1;
}
Reply


Messages In This Thread
creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 14:30
Re: creating a file with yini? - by Sascha - 18.04.2011, 14:46
Re: creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 14:52
Re: creating a file with yini? - by Tommy_Mandaz - 18.04.2011, 15:32
Re: creating a file with yini? - by Sascha - 18.04.2011, 17:22

Forum Jump:


Users browsing this thread: 2 Guest(s)