Bizz Help
#5

Код:
LoadBizz() {

	if(!fexist("bizz.cfg")) return 1;

	new
		szFileStr[1024],
		File: iFileHandle = fopen("bizz.cfg", io_read),
		iIndex;

	while(iIndex < sizeof(BizzInfo) && fread(iFileHandle, szFileStr)) {
		sscanf(szFileStr, "p<|>iiis[128]s[24]ffffffffiiiiiiiiiiiiiiiiiff",
			BizzInfo[iIndex][bOwned],
			BizzInfo[iIndex][bOwner],
			BizzInfo[iIndex][bTextID],
			BizzInfo[iIndex][bPickupID],
			BizzInfo[iIndex][bInteriorVW],
			BizzInfo[iIndex][bInteriorInt],
			BizzInfo[iIndex][bExteriorVW],
			BizzInfo[iIndex][bExteriorInt],
			BizzInfo[iIndex][bExtortion],
			BizzInfo[iIndex][bExteriorX],
			BizzInfo[iIndex][bExteriorY],
			BizzInfo[iIndex][bExteriorZ],
			BizzInfo[iIndex][bExteriorR],
			BizzInfo[iIndex][bInteriorX],
			BizzInfo[iIndex][bInteriorY],
			BizzInfo[iIndex][bInteriorZ],
			BizzInfo[iIndex][bInteriorR],
			BizzInfo[iIndex][bLevel],
			BizzInfo[iIndex][bBuyPrice],
			BizzInfo[iIndex][bEntranceCost],
			BizzInfo[iIndex][bSafeMoney],
			BizzInfo[iIndex][bTill],
			BizzInfo[iIndex][bLocked],
			BizzInfo[iIndex][bProducts],
			BizzInfo[iIndex][bDelivProd],
			BizzInfo[iIndex][bType],
			BizzInfo[iIndex][BusinessProdPrice],
			BizzInfo[iIndex][BusinessPrice],
			BizzInfo[iIndex][bPickupModel],
			BizzInfo[iIndex][BusinessFee],
			BizzInfo[iIndex][BusinessProducts],
			BizzInfo[iIndex][bPriceProd],
			BizzInfo[iIndex][bMaxProducts],
			BizzInfo[iIndex][bProductPrice][0],
			BizzInfo[iIndex][bProductPrice][1],
			BizzInfo[iIndex][bProductPrice][2],
			BizzInfo[iIndex][bProductPrice][3],
			BizzInfo[iIndex][bProductPrice][4],
			BizzInfo[iIndex][bProductPrice][5],
			BizzInfo[iIndex][bProductPrice][6],
			BizzInfo[iIndex][bProductPrice][7],
			BizzInfo[iIndex][bProductPrice][8],
			BizzInfo[iIndex][bProductPrice][9],
			BizzInfo[iIndex][bProductPrice][10],
			BizzInfo[iIndex][bProductPrice][11],
			BizzInfo[iIndex][bProductPrice][12],
			BizzInfo[iIndex][bProductPrice][13],
			BizzInfo[iIndex][bProductPrice][14],
			BizzInfo[iIndex][bProductPrice][15],
			BizzInfo[iIndex][bProductPrice][16],
			BizzInfo[iIndex][bProductPrice][17],
			BizzInfo[iIndex][bProductPrice][18],
			BizzInfo[iIndex][bProductPrice][19]
		);

		if(BizzInfo[iIndex][bOwned]) {
			format(szFileStr, sizeof(szFileStr), "%s\n\n\nOwner: %s\nType: %s\nEntrance Fee: %s\nID: %d",BizzInfo[iIndex][bLocked],BizzInfo[iIndex][bOwner],BizzInfo[iIndex][bType],BizzInfo[iIndex][bEntranceCost],iIndex);

		}
		else format(szFileStr, sizeof(szFileStr), "This business is\n for sale!\nCost: $%d\nType: %s\nLevel: %d\nID: %d\nTo buy this business type /buybizz",BizzInfo[iIndex][bBuyPrice],BizzInfo[iIndex][bType],BizzInfo[iIndex][bLevelNeeded],iIndex);

		CreateBusiness(iIndex)
		BizzInfo[iIndex][bTextID] = CreateDynamic3DTextLabel(szFileStr, COLOR_GREEN, BizzInfo[iIndex][bExteriorX], BizzInfo[iIndex][bExteriorY], BizzInfo[iIndex][bExteriorZ]+0.5,30.0, .testlos = 1, .streamdistance = 30.0);
		++iIndex;
	}
	return fclose(iFileHandle);
}
Reply


Messages In This Thread
Bizz Help - by Kenway - 02.05.2013, 15:55
Re: Bizz Help - by Yashas - 02.05.2013, 15:57
Re: Bizz Help - by Kenway - 02.05.2013, 15:58
Re: Bizz Help - by CJay9209 - 02.05.2013, 16:02
Re: Bizz Help - by RaZzZzoR - 02.05.2013, 16:02
Re: Bizz Help - by Yashas - 02.05.2013, 16:02
Re: Bizz Help - by Kenway - 02.05.2013, 16:04
Re: Bizz Help - by Yashas - 02.05.2013, 16:07
Re: Bizz Help - by Yashas - 02.05.2013, 16:21
Re: Bizz Help - by Kenway - 02.05.2013, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)