Advertisement
ykos

Untitled

Jun 21st, 2021
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.38 KB | None | 0 0
  1. void LoadPropertyObjects()
  2. {
  3.     new rows = 0;
  4.     cache_get_row_count(rows);
  5.  
  6.     for(new i = 0, end = (rows <= MAX_PROPERTY_OBJECTS) ? (rows) : (MAX_PROPERTY_OBJECTS); i < end; i++)
  7.     {
  8.         cache_get_value_index_int(i, 0, PropertyObject[i][po_uid]);
  9.  
  10.         cache_get_value_index_int(i, 1, PropertyObject[i][po_type]);
  11.         cache_get_value_index_int(i, 2, PropertyObject[i][po_type_id]);
  12.         cache_get_value_index_int(i, 3, PropertyObject[i][po_type_slot]);
  13.  
  14.         cache_get_value_index_int(i, 4, PropertyObject[i][po_item]);
  15.         cache_get_value_index_float(i, 5, PropertyObject[i][po_pos][0]);
  16.         cache_get_value_index_float(i, 6, PropertyObject[i][po_pos][1]);
  17.         cache_get_value_index_float(i, 7, PropertyObject[i][po_pos][2]);
  18.         cache_get_value_index_float(i, 8, PropertyObject[i][po_pos][3]);
  19.         cache_get_value_index_float(i, 9, PropertyObject[i][po_pos][4]);
  20.         cache_get_value_index_float(i, 10, PropertyObject[i][po_pos][5]);
  21.  
  22.         cache_get_value_index_int(i, 11, PropertyObject[i][po_create_owner_uid]);
  23.         cache_get_value_index(i, 12, PropertyObject[i][po_create_owner_name]);
  24.         cache_get_value_index(i, 13, PropertyObject[i][po_create_date]);
  25.        
  26.         cache_get_value_index_int(i, 14, PropertyObject[i][po_vw]);
  27.         cache_get_value_index_int(i, 15, PropertyObject[i][po_int]);
  28.  
  29.         PropertyObject[i][po_objectid] = CreateDynamicObject(ITEM_INFO[PropertyObject[i][po_item]][MODEL],
  30.             PropertyObject[i][po_pos][0], PropertyObject[i][po_pos][1], PropertyObject[i][po_pos][2],
  31.             PropertyObject[i][po_pos][3], PropertyObject[i][po_pos][4], PropertyObject[i][po_pos][5],
  32.             .worldid = PropertyObject[i][po_vw],
  33.             .interiorid = PropertyObject[i][po_int]);
  34.  
  35.         if(PropertyObject[i][po_type] == 0)
  36.         {
  37.             HouseInfo[PropertyObject[i][po_type_id]][hPropObject][PropertyObject[i][po_type_slot]] = i;
  38.  
  39.             if(PropertyObject[i][po_vw] == 0 && PropertyObject[i][po_int] == 0) {
  40.                 HouseInfo[PropertyObject[i][po_type_id]][hPropObjectCount][0]++;
  41.             }
  42.             else {
  43.                 HouseInfo[PropertyObject[i][po_type_id]][hPropObjectCount][1]++;
  44.             }
  45.         }
  46.         else if(PropertyObject[i][po_type] == 1)
  47.         {
  48.             BizInfo[PropertyObject[i][po_type_id]][bPropObject][PropertyObject[i][po_type_slot]] = i;
  49.            
  50.             if(PropertyObject[i][po_vw] == 0 && PropertyObject[i][po_int] == 0) {
  51.                 BizInfo[PropertyObject[i][po_type_id]][bPropObjectCount][0]++;
  52.             }
  53.             else {
  54.                 BizInfo[PropertyObject[i][po_type_id]][bPropObjectCount][1]++;
  55.             }
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement