Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (wcsstr(ObjName(Actor).Data, L"BP_SmallStorageBox") || wcsstr(ObjName(Actor).Data, L"BP_SmallStorageBoxTrash"))
  2. {
  3. AStorageBox* m_SmallStorageBox = (AStorageBox*)Actor;
  4. char SmallStor[100];
  5. sprintf(SmallStor, "[%i]StorBox[%0.f]",m_SmallStorageBox->g_itemContainerSize(), dist2);
  6. float text_width = MENU::text_micrac_contur.GetTextWidth(SmallStor, 20);
  7. MENU::text_micrac_contur.DX11DrawEx(SmallStor, Screen.X - text_width / 2, Screen.Y, 20, BGUI::color_green, 0, 0, 0, 1, *BGUI::color_black);
  8.  
  9. if (m_SmallStorageBox->m_itemContainer() != 0)
  10. {
  11. for (int i = 0; i < m_SmallStorageBox->g_itemContainerSize(); i++)
  12. {
  13. if (MyBadReadPtr((ULONGLONG)m_SmallStorageBox->m_itemContainer()[i].m_itemName.Data, 0, 3))goto exit_StorName;
  14. ///////////////////////////////////StorName/////////////////////////////////////////////////////////////////////////
  15. char str_stash_loot_name[256];
  16. WCHAR w_stash_loot_name[256];
  17. int count = m_SmallStorageBox->m_itemContainer()[i].m_itemName.Count;
  18. if(count > 256)count = 256;
  19. memcpy(w_stash_loot_name, m_SmallStorageBox->m_itemContainer()[i].m_itemName.data, count*2);
  20. w_stash_loot_name[count - 1] = 0;
  21. BASE_STRINGS::UnicodeToAscii(w_stash_loot_name, str_stash_loot_name);
  22. /////////////////////////////////////StorName/////////////////////////////////////////////////////////////////////////
  23.  
  24. MENU::text_arial.DX11DrawEx(str_stash_loot_name, Screen.X - text_width / 2, Screen.Y + 20 + (20 * i), 20, BGUI::color_white, 0, 0, 0, 1, *BGUI::color_black);
  25.  
  26. exit_StorName:;
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement