SII - y_ini
#4

First You need to define the place you want to save
the
Код:
#define OwnerPath "Business/Owners/%s.ini" /*Will define owner path*/
Код:
stock Path(playerid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));

    for(new d,len = strlen(name); d != len; d++)
        name[d] = tolower(name[d]);

    format(str,sizeof(str),OwnerPath,name);
    return str;
}
Код:
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Business_Owner_Data"); //this will be tag on the file which will save the data
INI_WriteInt(file,"Goods",BusinessInfo[shopid][bGoods]);
INI_Close(file);//Now after we've done saving their data, we now need to close the file
Sorry didn't saw the upper post well i think he got better way
Reply


Messages In This Thread
SII - y_ini - by vassilis - 19.04.2014, 21:02
Re: SII - y_ini - by vassilis - 20.04.2014, 12:54
Re: SII - y_ini - by Emmet_ - 20.04.2014, 12:59
Re: SII - y_ini - by AroseKhanNiazi - 20.04.2014, 13:12

Forum Jump:


Users browsing this thread: 1 Guest(s)