Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van. 106
Segítségkérés / Házrendszer« Dátum: 2013. március 24. - 15:53:59 »
sikerült megoldanom, köszönöm a segítéget ++
108
Segítségkérés / Házrendszer« Dátum: 2013. március 24. - 10:48:15 »
Mostsem jó itt a kép házról a farmnál...
http://kepfeltoltes.hu/view/130324/sa-mp-048_www.kepfeltoltes.hu_.png 110
Segítségkérés / Házrendszer« Dátum: 2013. március 24. - 09:59:38 »
Houses mappába és le is menti, restart után a mappába megmaradnak a házak csak a játékba nem tölti be.... és a farm közepén a föld alatt van pár ház...
111
Segítségkérés / Házrendszer« Dátum: 2013. március 24. - 09:42:19 »
Mentés: HouseFile_Save(HouseID) { new file[100], File:HFile, LineForFile[100], vid; // Construct the complete filename for this house format(file, sizeof(file), HouseFile, HouseID); // Open the housefile for writing HFile = fopen(file, io_write); if (AHouseData[HouseID][Owned] == true) // Check if the house is owned format(LineForFile, 100, \"Owned Yes\\r\\n\"); // Construct the line: \"Owned Yes\" else format(LineForFile, 100, \"Owned No\\r\\n\"); // Construct the line: \"Owned No\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"Owner %s\\r\\n\", AHouseData[HouseID][Owner]); // Construct the line: \"Owner <Owner>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseName %s\\r\\n\", AHouseData[HouseID][HouseName]); // Construct the line: \"HouseName <HouseName>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseX %f\\r\\n\", AHouseData[HouseID][HouseX]); // Construct the line: \"HouseX <HouseX>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseY %f\\r\\n\", AHouseData[HouseID][HouseY]); // Construct the line: \"HouseY <HouseY>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseZ %f\\r\\n\", AHouseData[HouseID][HouseZ]); // Construct the line: \"HouseZ <HouseZ>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseLevel %i\\r\\n\", AHouseData[HouseID][HouseLevel]); // Construct the line: \"HouseLevel <HouseLevel>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HouseMaxLevel %i\\r\\n\", AHouseData[HouseID][HouseMaxLevel]); // Construct the line: \"HouseMaxLevel <HouseMaxLevel>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"HousePrice %i\\r\\n\", AHouseData[HouseID][HousePrice]); // Construct the line: \"HousePrice <HousePrice>\" fwrite(HFile, LineForFile); // And save it to the file if (AHouseData[HouseID][HouseOpened] == true) // Check if the house is open to the public format(LineForFile, 100, \"HouseOpened Yes\\r\\n\"); // Construct the line: \"HouseOpened Yes\" else format(LineForFile, 100, \"HouseOpened No\\r\\n\"); // Construct the line: \"HouseOpened No\" fwrite(HFile, LineForFile); // And save it to the file if (AHouseData[HouseID][insurance] == true) // Check if the house has insurance for it\'s vehicles format(LineForFile, 100, \"Insurance Yes\\r\\n\"); // Construct the line: \"Insurance Yes\" else format(LineForFile, 100, \"Insurance No\\r\\n\"); // Construct the line: \"Insurance No\" fwrite(HFile, LineForFile); // And save it to the file if (AHouseData[HouseID][staticHouse] == true) // Check if the house is a static house format(LineForFile, 100, \"StaticHouse Yes\\r\\n\"); // Construct the line: \"StaticHouse Yes\" else format(LineForFile, 100, \"StaticHouse No\\r\\n\"); // Construct the line: \"StaticHouse No\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"CarSlots %i\\r\\n\", AHouseData[HouseID][CarSlots]); // Construct the line: \"CarSlots <CarSlots>\" fwrite(HFile, LineForFile); // And save it to the file fwrite(HFile, \"\\r\\n\"); // Add an empty line, just for readability // Save the vehicle-data for every vehicle added to the house for (new CarSlot; CarSlot < AHouseData[HouseID][CarSlots]; CarSlot++) { // If a valid vehicle-id has been found if (AHouseData[HouseID][VehicleIDs][CarSlot] != 0) { // Get the vehicle id vid = AHouseData[HouseID][VehicleIDs][CarSlot]; format(LineForFile, 100, \"[Vehicle]\\r\\n\"); // Construct the line: \"[Vehicle]\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleModel %i\\r\\n\", AVehicleData[vid][Model]); // Construct the line: \"VehicleModel <VehicleModel>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehiclePaintJob %i\\r\\n\", AVehicleData[vid][PaintJob]); // Construct the line: \"VehiclePaintJob <VehiclePaintJob>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleSpoiler %i\\r\\n\", AVehicleData[vid][Components][0]); // Construct the line: \"VehicleSpoiler <VehicleSpoiler>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleHood %i\\r\\n\", AVehicleData[vid][Components][1]); // Construct the line: \"VehicleHood <VehicleHood>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleRoof %i\\r\\n\", AVehicleData[vid][Components][2]); // Construct the line: \"VehicleRoof <VehicleRoof>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleSideSkirt %i\\r\\n\", AVehicleData[vid][Components][3]); // Construct the line: \"VehicleSideSkirt <VehicleSideSkirt>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleLamps %i\\r\\n\", AVehicleData[vid][Components][4]); // Construct the line: \"VehicleLamps <VehicleLamps>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleNitro %i\\r\\n\", AVehicleData[vid][Components][5]); // Construct the line: \"VehicleNitro <VehicleNitro>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleExhaust %i\\r\\n\", AVehicleData[vid][Components][6]); // Construct the line: \"VehicleSpoiler <VehicleSpoiler>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleWheels %i\\r\\n\", AVehicleData[vid][Components][7]); // Construct the line: \"VehicleWheels <VehicleWheels>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleStereo %i\\r\\n\", AVehicleData[vid][Components][8]); // Construct the line: \"VehicleStereo <VehicleStereo>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleHydraulics %i\\r\\n\", AVehicleData[vid][Components][9]); // Construct the line: \"VehicleHydraulics <VehicleHydraulics>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleFrontBumper %i\\r\\n\", AVehicleData[vid][Components][10]); // Construct the line: \"VehicleFrontBumper <VehicleFrontBumper>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleRearBumper %i\\r\\n\", AVehicleData[vid][Components][11]); // Construct the line: \"VehicleRearBumper <VehicleRearBumper>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleVentRight %i\\r\\n\", AVehicleData[vid][Components][12]); // Construct the line: \"VehicleVentRight <VehicleVentRight>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleVentLeft %i\\r\\n\", AVehicleData[vid][Components][13]); // Construct the line: \"VehicleVentLeft <VehicleVentLeft>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"Color1 %i\\r\\n\", AVehicleData[vid][Color1]); // Construct the line: \"Color1 <Color1>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"Color2 %i\\r\\n\", AVehicleData[vid][Color2]); // Construct the line: \"Color2 <Color2>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleX %f\\r\\n\", AVehicleData[vid][spawnX]); // Construct the line: \"VehicleVentLeft <VehicleVentLeft>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleY %f\\r\\n\", AVehicleData[vid][spawnY]); // Construct the line: \"VehicleVentLeft <VehicleVentLeft>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleZ %f\\r\\n\", AVehicleData[vid][spawnZ]); // Construct the line: \"VehicleVentLeft <VehicleVentLeft>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"VehicleAngle %f\\r\\n\", AVehicleData[vid][spawnRot]); // Construct the line: \"VehicleVentLeft <VehicleVentLeft>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"Fuel %i\\r\\n\", INT_GetVehicleFuel(vid)); // Construct the line: \"Fuel <Fuel>\" fwrite(HFile, LineForFile); // And save it to the file format(LineForFile, 100, \"[/Vehicle]\\r\\n\"); // Construct the line: \"[/Vehicle]\" fwrite(HFile, LineForFile); // And save it to the file fwrite(HFile, \"\\r\\n\"); // Add an empty line, just for readability } } fclose(HFile); // Close the file return 1; } Betöltés: HouseFile_Load(HouseID) { // 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); // 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 (strlen(LineFromFile) > 0) { StripNewLine(LineFromFile); // Strip any newline characters from the LineFromFile sscanf(LineFromFile, \"s[50]s[50]\", ParameterName, ParameterValue); // Extract parametername and parametervalue // Check if there is anything in the LineFromFile (skipping empty lines) if (strlen(LineFromFile) > 0) { // Store the proper value in the proper place if (strcmp(ParameterName, \"Owned\", false) == 0) // If the parametername is correct (\"Owned\") { if (strcmp(ParameterValue, \"Yes\", false) == 0) // If the value \"Yes\" was read AHouseData[HouseID][Owned] = true; // House is owned else AHouseData[HouseID][Owned] = false; // House is not owned } if (strcmp(ParameterName, \"Owner\", false) == 0) // If the parametername is correct (\"Owner\") // Store the Owner (Owner will hold \"1\" if there is no owner (empty string), done by \"sscanf\" I guess) // But this doesn\'t matter, as the owner will never be displayed when the house is not owned by someone format(AHouseData[HouseID][Owner], 24, ParameterValue); if (strcmp(ParameterName, \"HouseName\", false) == 0) // If the parametername is correct (\"HouseName\") format(AHouseData[HouseID][HouseName], 24, ParameterValue); // Store the HouseName if (strcmp(ParameterName, \"HouseX\", false) == 0) // If the parametername is correct (\"HouseX\") AHouseData[HouseID][HouseX] = floatstr(ParameterValue); // Store the HouseX if (strcmp(ParameterName, \"HouseY\", false) == 0) // If the parametername is correct (\"HouseY\") AHouseData[HouseID][HouseY] = floatstr(ParameterValue); // Store the HouseY if (strcmp(ParameterName, \"HouseZ\", false) == 0) // If the parametername is correct (\"HouseZ\") AHouseData[HouseID][HouseZ] = floatstr(ParameterValue); // Store the HouseZ if (strcmp(ParameterName, \"HouseLevel\", false) == 0) // If the parametername is correct (\"HouseLevel\") AHouseData[HouseID][HouseLevel] = strval(ParameterValue); // Store the HouseLevel if (strcmp(ParameterName, \"HouseMaxLevel\", false) == 0) // If the parametername is correct (\"HouseMaxLevel\") AHouseData[HouseID][HouseMaxLevel] = strval(ParameterValue); // Store the HouseMaxLevel if (strcmp(ParameterName, \"HousePrice\", false) == 0) // If the parametername is correct (\"HousePrice\") AHouseData[HouseID][HousePrice] = strval(ParameterValue); // Store the HousePrice if (strcmp(ParameterName, \"HouseOpened\", false) == 0) // If the parametername is correct (\"HouseOpened\") { if (strcmp(ParameterValue, \"Yes\", false) == 0) // If the value \"Yes\" was read AHouseData[HouseID][HouseOpened] = true; // House is open to the public (anyone can enter) else AHouseData[HouseID][HouseOpened] = false; // House is closed to the public, only house-owner can enter } if (strcmp(ParameterName, \"Insurance\", false) == 0) // If the parametername is correct (\"Insurance\") { if (strcmp(ParameterValue, \"Yes\", false) == 0) // If the value \"Yes\" was read AHouseData[HouseID][insurance] = true; // House has insurance for it\'s vehicles else AHouseData[HouseID][insurance] = false; // House doesn\'t have insurance } if (strcmp(ParameterName, \"StaticHouse\", false) == 0) // If the parametername is correct (\"StaticHouse\") { if (strcmp(ParameterValue, \"Yes\", false) == 0) // If the value \"Yes\" was read AHouseData[HouseID][staticHouse] = true; // House is static (not upgradable, fixed interior and carslots) else AHouseData[HouseID][staticHouse] = false; // House isn\'t static (upgradable, interior and carslots based on HouseLevel) } if (strcmp(ParameterName, \"CarSlots\", false) == 0) // If the parametername is correct (\"CarSlots\") AHouseData[HouseID][CarSlots] = strval(ParameterValue); // Store the CarSlots } // Read the next line of the file fread(HFile, LineFromFile); } // Close the file fclose(HFile); // Add a pickup and 3DText for this house House_UpdateEntrance(HouseID); // Count the amount of houses that are loaded TotalHouses++; // Return if the file was read correctly return 1; } else return 0; // Return 0 if the file couldn\'t be read (doesn\'t exist) } 112
Segítségkérés / Házrendszer« Dátum: 2013. március 24. - 09:27:31 »
Sziasztok! Egy kis problémám van a PPC házrendszerrel, amit az angol fórumról töltöttem le mint egy külön scritpet vagyis nem a kamionos modban van, remélem eddig érthetõ voltam . Szóval azvan, hogy lementi a házakat a Houses mappába de mikor restartolom a szervert nem tölti be a házakat... valakinek van valami ötlete?
113
Off Telep / Ncore Meghívó :)« Dátum: 2013. március 21. - 20:09:16 »
[email protected] nagyon hálás lennék
114
Archívum / Call of Duty 5 @ crux-host.eu« Dátum: 2013. március 17. - 12:51:33 »
nagyon jó szerver nekem tetszik elkeztem játszani gyûjtöttem vagy 100 pontot persze regisztráltam és mikor leléptem oda lett a 100 pontom...kérlek majd ird vissza a 100 pontomat elõre is köszi és sok sikert a szerverhez
115
Általános / Milyen szerver lenne mostanság jó?« Dátum: 2013. március 16. - 11:03:23 »
ha nagyon sok minigame lenne amit megszavazhatnának a játékosok, hogy adott körülményekben meik minigamet szeretnék az jó lenne és még sikere is lenne a szervernek.
116
Archívum / Tiszteleteid megtekintése« Dátum: 2013. március 13. - 20:31:25 »
kibaszott jó lett grat
117
Archívum / [HUN] ..:: Paradise Fun Party Szerver™ ::.. [0.3x] @ Sunwell.hu« Dátum: 2013. március 09. - 23:23:58 »
nagyon szép leírás és a szerver is nagyon jó lett voltam már fent grat
118
Archívum / [HUN]StuntLife« Dátum: 2013. február 25. - 23:24:01 »
Nagyon vagány a bemutató videó gratuálok hozzá
119
SA-MP: Szerverfejlesztés / Kinder Village V2.0 [Kinder visszatérõ munkája]« Dátum: 2013. február 19. - 22:58:58 »
Nagyon tetszik felhasználom
|