public LoadBizz()
{
new file[120];
for(new idx = 0; idx < sizeof(HouseInfo) ; idx++)
{
format(file, sizeof(file),"Bizzes/%d.ini", idx)
LINE (9957) >> if(dini_Exists(file))
{
BizzInfo[idx][bOwned] = dini_Int(file,"Owned");
strmid(BizzInfo[idx][bOwner], dini_Get(file,"Owner"), 0, strlen(dini_Get(file,"Owner")), 255);
strmid(BizzInfo[idx][bMessage], dini_Get(file,"Message"), 0, strlen(dini_Get(file,"Message")), 255);
strmid(BizzInfo[idx][bExtortion], dini_Get(file,"ExtortionBy"), 0, strlen(dini_Get(file,"ExtortionBy")), 255);
BizzInfo[idx][bEntranceX] = dini_Float(file,"Entrance_X");
BizzInfo[idx][bEntranceY] = dini_Float(file,"Entrance_Y");
BizzInfo[idx][bEntranceZ] = dini_Float(file,"Entrance_Z");
BizzInfo[idx][bExitX] = dini_Float(file,"Exit_X");
BizzInfo[idx][bExitY] = dini_Float(file,"Exit_Y");
BizzInfo[idx][bExitZ] = dini_Float(file,"Exit_Z");
BizzInfo[idx][bLevelNeeded] = dini_Int(file,"LevelNeeded");
BizzInfo[idx][bBuyPrice] = dini_Int(file,"Price");
BizzInfo[idx][bEntranceCost] = dini_Int(file,"EntranceCost");
BizzInfo[idx][bTill] = dini_Int(file,"Till");
BizzInfo[idx][bLocked] = dini_Int(file,"Locked");
BizzInfo[idx][bInterior] = dini_Int(file,"Interior");
BizzInfo[idx][bProducts] = dini_Int(file,"Products");
BizzInfo[idx][bMaxProducts] = dini_Int(file,"MaxProducts");
BizzInfo[idx][bPriceProd] = dini_Int(file,"ProductPrice");
BizzInfo[idx][bVirWorld] = dini_Int(file,"VirtualWorld");
BizzInfo[idx][bInteriorNr] = dini_Int(file,"InteriorNr");
BizzInfo[idx][bSetted] = dini_Int(file,"Setted");
}
}
print("[INFLAME]: BizU PULI");
return 1;
}
format(file, sizeof(file),"Bizzes/%d.ini", idx)
format(file, sizeof(file),"Bizzes/%d.ini", idx);
format(file, sizeof(file),"Bizzes/%d.ini", idx)
format(file, sizeof(file),"Bizzes/%d.ini", idx); // You forgot the semicolon.
for(new h = 0; h < sizeof(BizzInfo); h++)
if(BizzInfo[h][bSetted] == 1)
{
if(BizzInfo[h][bOwned] == 0)
{
format(PropertyString,sizeof(PropertyString),"Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
pickups++;
}
}
pawn Код:
pawn Код:
|
for(new h = 0; h < sizeof(BizzInfo); h++)
if(BizzInfo[h][bSetted] == 1)
{
if(BizzInfo[h][bOwned] == 0)
{
format(string, sizeof(string), "Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
Create3DTextLabel(string ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
pickups++;
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bSetted] == 1)
{
if(BizzInfo[h][bOwned] == 0)
{
format(string, sizeof(string), "Afacere de vanzare \n Nume Afacere: %s \n Afacere ID: %d \n Pret: $%d \n Level Necesar: %d",BizzInfo[h][bMessage], BizzInfo[h][bVirWorld], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded]);
BizzLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
else if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "%s \n Proprietarul: %s \n Nume Afacere: %d \n Extortion: %s \n Intrare Fee: $%d. \n Pentru a intra in bizz scrieti /enter.",BizzInfo[h][bMessage],BizzInfo[h][bOwner], BizzInfo[h][bVirWorld], BizzInfo[h][bExtortion], BizzInfo[h][bEntranceCost]);
Create3DTextLabel(string ,0x00FFFFAA,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],50, 0, 1);
}
BizzPickup[h] = CreateDynamicPickup(1274,1,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ],-1);
pickups++;
}
}
I suggest you read the basic scripting documentation before getting deep into loading and saving data before you even know how to indent your code properly and how brackets work.
|
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hSetted] == 1)
{
if(HouseInfo[h][hOwned] == 0)
{
if(HouseInfo[h][hSetted] == 1)
{
format(PropertyString,sizeof(PropertyString),"House is UNOWNED! \n House ID: %d \n Price: $%d \n Description: %s \n Level Needed: %d",HouseInfo[h][hWorld], HouseInfo[h][hValue],HouseInfo[h][hDiscription], HouseInfo[h][hLevel]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FF00AA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
HousePickup[h] = CreateDynamicPickup(1273, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}
else if(HouseInfo[h][hOwned] == 1)
{
format(PropertyString,sizeof(PropertyString),"%s \n Owner: %s \n House ID: %d \n Rent Price: $%d \n Description: %s \n To Rent Type /rentroom",HouseInfo[h][hMessage],HouseInfo[h][hOwner],HouseInfo[h][hWorld], HouseInfo[h][hRent], HouseInfo[h][hDiscription]);
HouseLabel[h] = Create3DTextLabel(PropertyString ,0x00FFFFAA,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],25, 0, 1);
HousePickup[h] = CreateDynamicPickup(1272, 1, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
}
}
}