Sziasztok! Elakadtam, de érzem, hogy közel járok.
Arról lenne szó, hogy egy angol (letöltött) házrendszerbe próbálok belefűzni egy bútor rendszert.
Minden szuper, a menü, a létrehozás, a vásárlás, a mentés...
Viszont a betöltés nem akar sikerülni...
Beillesztem ide azokat a részeket, amire szükségetek lehet. (Nem a teljes scriptet.)
(A betöltést a házrendszer kocsibetöltéséből próbáltam átalakítani. De sehogy se akar sikerülni...)
Előre is köszönöm, ha valaki segít.
///Enumok
enum THouseData
{
PickupID, // Holds the pickup-id that is linked to this house
Text3D:DoorText, // Holds the reference to the 3DText above the house\'s pickup
MapIconID, // Holds the ID of the mapicon for the house
bool:Owned, // Holds true if the house is owned by somebody
Owner[24], // Holds the name of the owner of the house
HouseName[100], // Holds the name of the house (this will be displayed above the pickup near the house when it\'s owned)
Float:HouseX, // Holds the X-coordinate of the pickup for the house
Float:HouseY, // Holds the Y-coordinate of the pickup for the house
Float:HouseZ, // Holds the Z-coordinate of the pickup for the house
HouseLevel, // Holds the level of upgrades the house has, and defines which interior to use when you enter the house
HouseMaxLevel, // Holds the maximum level this house can be upgraded to
HousePrice, // Holds the price for buying the house, the same price applies when upgrading a house per level (multiplied by HouseUpgradePercent/100)
bool:HouseOpened, // Holds true if the house is open to the public (anyone can enter), false means: only the owner can enter it
bool:Insurance, // Holds \"true\" if the house has an insurance for the vehicles belonging to this house
VehicleIDs[10], // Holds the vehicle-id\'s of the vehicles linked to this house (max 10 vehicles per house)
bool:StaticHouse, // Holds \"true\" if the house is static (cannot be upgraded and has a fixed interior)
CarSlots, // Holds the amount of carslots available
//butorok
FCount,
FModel[MAX_FURNITURE],
FurnitureObj[MAX_FURNITURE],
Float:FPosX[MAX_FURNITURE],
Float:FPosY[MAX_FURNITURE],
Float:FPosZ[MAX_FURNITURE],
Float:FRotX[MAX_FURNITURE],
Float:FRotY[MAX_FURNITURE],
Float:FRotZ[MAX_FURNITURE],
Interiorja,
VirtualWorld
}
// Holds the data for all houses
new AHouseData[MAX_HOUSES][THouseData];
////////////////////
//Betöltés
///////////////////
Butorokbetolt(HouseID) //A gamemode betöltésénél van, ugyanígy tölti be a házakat.
{
// Setup local variables
new file[100], File:HFile, LineFromFile[100], ParameterName[50], ParameterValue[50];
// Construct the complete filename for this house-file
format(file, sizeof(file), HouseFile, HouseID);
// Construct the complete filename for this house-file
// Check if the HouseFile exists
if (fexist(file))
{
// Open the housefile for reading
HFile = fopen(file, io_read);
// Read the first line of the file
fread(HFile, LineFromFile);
// Keep reading until the end of the file is found (no more data)
// An empty line between data-segments still has the NewLine characters (\\r\\n) so it\'s not completely empty
// Reading past the last line will read a completely empty line, therefore indicating the end of the file
while (