21.05.2016, 11:04
Код HTML:
stock LoadHotels() { new file[64], count, string[128]; for(new ho = 0; ho < MAX_HOTELS; ho++) { format(file, 64, "Hotels/%d.ini", ho); if(fexist(file)) { INI_ParseFile(HotelPath(ho), "LoadHotelData", false, true, ho, true, false); if(hoInfo[ho][Bought] == 0) { format(string, sizeof(string), "[Hotel]\nLocataire: %s\n Adresse: %d rue Stenlen\nPrix: %d$", hoInfo[ho][Owner], ho, hoInfo[ho][Price]); hoInfo[ho][Label] = Create3DTextLabel(string ,0xB5CACCFF, hoInfo[ho][extX], hoInfo[ho][extY], hoInfo[ho][extZ], 20.0, 0, 1); } if(hoInfo[ho][Bought] == 1) { format(string, sizeof(string), "[Hotel]\nLocataire: %s\nAdresse: %d rue Stenlen\nPlus а louй", hoInfo[ho][Owner], ho); hoInfo[ho][Label] = Create3DTextLabel(string ,0xB5CACCFF, hoInfo[ho][extX], hoInfo[ho][extY], hoInfo[ho][extZ], 20.0, 0, 1); } count++; } } return 1; }
Код HTML:
stock HotelPath(ho) { new Variable[64], hote = ho; format(Variable, 30, "Hotels/%d.ini", Variable); Variable[hoID] ++; // multiplying return hote; }