08.07.2010, 14:22
I think you can better use files: house1.ini, house2.ini so:
And create houses in House1.ini, House2.ini, House3.ini etc.
Edit
House1.ini:
House2.ini:
House3.ini:
House4.ini:
pawn Код:
new file[128];
for(new h = 1; h < sizeof(HouseInfo); h++)
{
format(file, 128, "LVRP/Properties/Houses/House%d.ini", h);
if(dini_Exists(file))
{
HouseInfo[h][hEntrancex] = dini_Float(file, "Enterance_X");
HouseInfo[h][hEntrancey] = dini_Float(file, "Enterance_Y");
HouseInfo[h][hEntrancez] = dini_Float(file, "Enterance_Z");
HouseInfo[h][hOwned] = dini_Int(file, "Owned");
HouseInfo[h][hOwner] = dini_Int(file, "Owner");
HouseInfo[h][hPrice] = dini_Int(file, "Price");
HouseInfo[h][hExitx] = dini_Float(file, "Exit_X");
HouseInfo[h][hExity] = dini_Float(file, "Exit_Y");
HouseInfo[h][hExitz] = dini_Float(file, "Exit_Z");
HouseInfo[h][hInterior] = dini_Int(file, "Interior");
HouseInfo[h][hVirtualWorld] = dini_Int(file, "World");
}
}
Edit
House1.ini:
Код:
Enterance_X=1365.420898 Enterance_Y=1974.188232 Enterance_Z=11.460900 OWned=0 Owner=None Price=200
Код:
Exit_X=2233.7600 Exit_Y=-1115.2631 Exit_Z=1050.8828 Interior=1 World=1
Код:
Enterance_X=1364.2799 Enterance_Y=1931.6750 Enterance_Z=11.4683 OWned=0 Owner=None Price=200
Код:
Exit_X=2233.7600 Exit_Y=-1115.2631 Exit_Z=1050.8828 Interior=1 World=1