Advertisement
Sem_Loreann

Untitled

Mar 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. void LoadHouse()
  2. {
  3. new string[256];
  4. int time = GetTickCount();
  5. if(!cache_num_rows()) return true;
  6. for(int idx = 0, ids = 0; idx < cache_num_rows(); ++idx, ++ids)
  7. {
  8. cache_get_value_index_int(idx, 0, HouseInfo[ids][hID]);
  9. cache_get_value_index_float(idx, 1, HouseInfo[ids][hEntr][0]);
  10. cache_get_value_index_float(idx, 2, HouseInfo[ids][hEntr][1]);
  11. cache_get_value_index_float(idx, 3, HouseInfo[ids][hEntr][2]);
  12. cache_get_value_index_float(idx, 4, HouseInfo[ids][hExit][0]);
  13. cache_get_value_index_float(idx, 5, HouseInfo[ids][hExit][1]);
  14. cache_get_value_index_float(idx, 6, HouseInfo[ids][hExit][2]);
  15. cache_get_value_index_float(idx, 7, HouseInfo[ids][hCar][0]);
  16. cache_get_value_index_float(idx, 8, HouseInfo[ids][hCar][1]);
  17. cache_get_value_index_float(idx, 9, HouseInfo[ids][hCar][2]);
  18. cache_get_value_index_float(idx, 10, HouseInfo[ids][hCar][3]);
  19. cache_get_value_index(idx, 11, HouseInfo[ids][hOwner], 32);
  20. cache_get_value_index(idx, 12, HouseInfo[ids][hDiscript], 16);
  21. cache_get_value_index_int(idx, 13, HouseInfo[ids][hPrice]);
  22. cache_get_value_index_int(idx, 14, HouseInfo[ids][hInt][0]);
  23. cache_get_value_index_int(idx, 15, HouseInfo[ids][hInt][1]);
  24. cache_get_value_index_int(idx, 16, HouseInfo[ids][hLock]);
  25. cache_get_value_index_int(idx, 17, HouseInfo[ids][hCash]);
  26. if(!strcmp(HouseInfo[ids][hOwner], "None", true))
  27. {
  28. HouseInfo[ids][hPickup][0] = CreatePickup(1273, 23, HouseInfo[ids][hEntr][0], HouseInfo[ids][hEntr][1], HouseInfo[ids][hEntr][2]);
  29. format(string, 256, "\
  30. Номер дома {"#GREEN"}#%i\n\
  31. {"#WHITE"}Стоимость {"#GREEN"}$%i\n\
  32. {"#WHITE"}Класс {"#GREEN"}%s\n\n\
  33. {"#WHITE"}Для покупки нажмите {"#YL"}ALT", HouseInfo[idx][hID], HouseInfo[idx][hPrice], HouseInfo[idx][hDiscript]);
  34. LABELHOUSE[idx] = CreateDynamic3DTextLabel(string, -1, HouseInfo[idx][hEntr][0], HouseInfo[idx][hEntr][1], HouseInfo[idx][hEntr][2]+1.1,5.0);
  35. }
  36. else
  37. {
  38. HouseInfo[ids][hPickup][0] = CreatePickup(19522, 23, HouseInfo[ids][hEntr][0], HouseInfo[ids][hEntr][1], HouseInfo[ids][hEntr][2]);
  39. format(string, 256, "\
  40. Номер дома {"#GREEN"}#%i\n\
  41. {"#WHITE"}Владелец {"#GREEN"}%s\n\
  42. {"#WHITE"}Класс {"#GREEN"}%s\n\n\
  43. {"#WHITE"}Для входа нажмите {"#YL"}ALT", HouseInfo[idx][hID], HouseInfo[idx][hOwner], HouseInfo[idx][hDiscript]);
  44. LABELHOUSE[idx] = CreateDynamic3DTextLabel(string, -1, HouseInfo[idx][hEntr][0], HouseInfo[idx][hEntr][1], HouseInfo[idx][hEntr][2]+1.1,5.0);
  45. }
  46. ++TOTALHOUSE;
  47. }
  48. print("\n*---------------------------------------------------------*");
  49. printf("[Load House]: loading %i bad %i (ms)", TOTALHOUSE, GetTickCount() - time);
  50. return true;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement