trouble with Biz saving for player
#1

hey guys i got this problem that my business system dosent save for player if they buy it after relog there wont be no business for player but shows that he owns it. (( i know you cant do it without a code to help me but just tell me please what i need to have to save biz for player ))

i just looked it though there is everything in the place also this

pawn Код:
stock SaveBiz()
{
    if(!fexist("biz.cfg")) fcreate("biz.cfg");
    new idx = 1, File:file;
    new string[256];
    while(idx < MAX_BIZ)
    {
        format(string, sizeof(string), "%d|%d|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d\r\n", BizInfo[idx][bType], BizInfo[idx][bStatus], BizInfo[idx][bOwner], BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ], BizInfo[idx][bMoney], BizInfo[idx][bProducts], BizInfo[idx][bSold], BizInfo[idx][bLevel], BizInfo[idx][bPrice], BizInfo[idx][bAP]);
        if(idx == 1)
        {
            file = fopen("biz.cfg", io_write);
        }
        else
        {
            file = fopen("biz.cfg", io_append);
        }
        fwrite(file, string);
        fclose(file);
        idx++;
    }
    print("Businesses saved at script file biz.cfg successfully.");
}
Thnaks for the help!
Reply


Messages In This Thread
trouble with Biz saving for player - by Acres - 11.07.2014, 08:42
Re: trouble with Biz saving for player - by KayJ - 11.07.2014, 09:09
Re: trouble with Biz saving for player - by Acres - 11.07.2014, 14:07
Re: trouble with Biz saving for player - by BroZeus - 11.07.2014, 14:14
Re: trouble with Biz saving for player - by Konstantinos - 11.07.2014, 14:55

Forum Jump:


Users browsing this thread: 1 Guest(s)