View difference between Paste ID: s5Lw3yZ0 and jizj7ReT
SHOW: | | - or go back to the newest paste.
1
FString ObjName(APawn* obj)
2
{
3-
	DWORD_PTR funcAddress = (DWORD_PTR)(DWORD64)BMEMORY6::GetModule(L"WTL-Win64-Shipping.exe")->BaseAddress + OFFS_GETOBJECTNAME;
3+
	static DWORD_PTR funcAddress = 0;
4-
	if (funcAddress != 0)
4+
    if(!funcAddress)funcAddress = (DWORD_PTR)((DWORD64)BMEMORY6::GetModule(L"WTL-Win64-Shipping.exe")->BaseAddress + OFFS_GETOBJECTNAME);
5
	return reinterpret_cast<FString(__fastcall*)(APawn*)>(funcAddress)(obj);
6-
		return reinterpret_cast<FString(__fastcall*)(APawn*)>(funcAddress)(obj);
6+
7
8
if (GetKeyState(VK_NUMPAD0))
9
{
10
    FString fstring = ObjName(Actor);
11-
	if (wcsstr(ObjName(Actor).Data, L"BP_InteractivePlant_Camomile") || wcsstr(ObjName(Actor).Data, L"BP_InteractivePlant_Brushwood")
11+
    
12-
		|| wcsstr(ObjName(Actor).Data, L"BP_InteractivePlant_MilkMushroom") || wcsstr(ObjName(Actor).Data, L"BP_InteractivePlant_Deathcup"))
12+
	if (wcsstr(fstring.Data, L"BP_InteractivePlant_Camomile") || wcsstr(fstring.Data, L"BP_InteractivePlant_Brushwood")
13
		|| wcsstr(fstring.Data, L"BP_InteractivePlant_MilkMushroom") || wcsstr(fstring.Data, L"BP_InteractivePlant_Deathcup"))
14
	{
15-
		sprintf(Grass, "%ls[%0.f]", ObjName(Actor).Data, dist2);
15+
16
		sprintf(Grass, "%ls[%0.f]", fstring.Data, dist2);
17
		float text_width = MENU::text_arial.GetTextWidth(Grass, 15);
18
		MENU::text_arial.DX11DrawEx(Grass, Screen.X - text_width / 2, Screen.Y, 20, BGUI::color_yellow, 0, 0, 0, 1, *BGUI::color_black);
19
	}
20
21
    fstring.Clear();
22
}