Line: 1772 Expression: _p != nullptr

weixin_40469559 weixin_40469559 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
程序运行就出错定位到这
include "Utils.h"

//definitions
namespace global
{
DWORD_PTR pUWorld = 0;
DWORD_PTR pGameInstance = 0;
DWORD_PTR pLocalPlayerArray = 0;
DWORD_PTR pLocalPlayer = 0;
DWORD_PTR pViewportClient = 0;
bool bPlayer = false;
bool bVehicle = false;
bool bLoot = false;
FCameraCacheEntry cameracache = { NULL };
}

void ESP()
{
if (GetAsyncKeyState(VK_NUMPAD3) & 1)
global::bVehicle = global::bVehicle ? false : true;
if(GetAsyncKeyState(VK_NUMPAD2) & 1)
global::bLoot = global::bLoot ? false : true;
if (GetAsyncKeyState(VK_NUMPAD1) & 1)
global::bPlayer = global::bPlayer ? false : true;
UpdateAddresses();
wchar_t entityname[64] = { NULL };
DWORD_PTR enlist = GetEntityList();
int entitycount = mem->RPM<int>(mem->RPM<DWORD_PTR>(global::pUWorld + 0x30, 0x8) + 0xA8, 0x4);
float health = 0.f;
float distance = 0.f;
DWORD color = 0;
Vector3 local = GetLocalPlayerPos();

for (int i = 0; i < entitycount; i++)
{
ZeroMemory(entityname, sizeof(entityname));
auto entity = mem->RPM<DWORD_PTR>(enlist + (i * 0x8), 0x8);
if (!entity)
continue;
if (entity == mem->RPM<DWORD_PTR>(mem->RPM<DWORD_PTR>(global::pLocalPlayer + 0x30, 0x8) + 0x418, 0x8))
continue;

int id = mem->RPM<int>(entity + 0x18, 0x4);
if (global::bPlayer && (id == ActorIds[0] || id == ActorIds[1] || id == ActorIds[2] || id == ActorIds[3]))
{
health = GetActorHealth(entity);
if (health > 0.f)
{
Vector3 pos = GetActorPos(entity);
Vector3 spos = WorldToScreen(pos, global::cameracache);
distance = local.Distance(pos) / 100.f;
if (distance > 400.f)
continue;
if (distance <= 150.f)
color = D3DCOLOR_ARGB(255, 255, 0, 0); //color red, if less than 150m
else if (distance > 150.f && distance <= 300.f)
color = D3DCOLOR_ARGB(255, 255, 255, 0); //color yellow, if less than 300m and greater than 150m
else
color = D3DCOLOR_ARGB(255, 0, 255, 0); //color green, if greater than 300m
DrawString((int)spos.x, (int)spos.y, color, pFont, "[Health: %0.2f]", health);
auto mesh = mem->RPM<DWORD_PTR>(entity + 0x400, 0x8);
if (!mesh && distance > 110.f)
continue;
DrawSkeleton(mesh); //draw skeleton, is distance is less than equal to 110m
}
}

//vehicle esp
if (global::bVehicle)
{
if (isUaz(id))
DrawVehicle(entity, local, "UAZ\nDistance: %0.2f");
else if (isDacia(id))
DrawVehicle(entity, local, "Dacia\nDistance: %0.2f");
else if (isBike(id))
DrawVehicle(entity, local, "Motorbike\nDistance: %0.2f");
else if (isBuggy(id))
DrawVehicle(entity, local, "Buggy\nDistance: %0.2f");
else if (isBoat(id))
DrawVehicle(entity, local, "Boat\nDistance: %0.2f");
}


if (global::bLoot && (id == itemtype[0] || id == itemtype[1]))
{
DWORD_PTR DroppedItemGroupArray = mem->RPM<DWORD_PTR>(entity + 0x2D8, 0x8);
int count = mem->RPM<int>(entity + 0x2E0, 0x4);

if (!count)
continue;
for (int j = 0; j < count; j++)
{
DWORD_PTR pADroppedItemGroup = mem->RPM<DWORD_PTR>(DroppedItemGroupArray + j * 0x10, 0x8);
Vector3 relative = mem->RPM<Vector3>(pADroppedItemGroup + 0x1E0, 0xC);
Vector3 screenloc = WorldToScreen(GetActorPos(entity) + relative, global::cameracache);
DWORD_PTR pUItem = mem->RPM<DWORD_PTR>(pADroppedItemGroup + 0x448, 0x8);
DWORD_PTR pUItemFString = mem->RPM<DWORD_PTR>(pUItem + 0x40, 0x8);
DWORD_PTR pItemName = mem->RPM<DWORD_PTR>(pUItemFString + 0x28, 0x8);

ZeroMemory(entityname, sizeof(entityname));
if(mem->RPMWSTR(pItemName, entityname, sizeof(entityname)))
DrawString(screenloc.x, screenloc.y, D3DCOLOR_ARGB(255, 255, 144, 0), pFont, "%ws", entityname);
}
}
}
}

//prevent memory leaks
void Shutdown()
{
if (!mem)
return;
mem->Close();
delete mem;
mem = nullptr;
}

//render function
void render()
{
// clear the window alpha
d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0);

d3ddev->BeginScene(); // begins the 3D scene

//calculate and and draw esp stuff
ESP();


d3ddev->EndScene(); // ends the 3D scene

d3ddev->Present(NULL, NULL, NULL, NULL); // displays the created frame on the screen
}

//set up overlay window
void SetupWindow()
{

RECT rc;


while(!twnd)
twnd = FindWindow(L"UnrealWindow", 0);
if (twnd != NULL)
{
GetWindowRect(twnd, &rc);
s_width = rc.right - rc.left;
s_height = rc.bottom - rc.top;
}
else
{
cout << "Closing..." << GetLastError() << endl;
Sleep(3000);
Shutdown();
ExitProcess(0);
}
WNDCLASSEX wc;

ZeroMemory(&wc, sizeof(WNDCLASSEX));

wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WindowProc;
wc.hInstance = GetModuleHandle(0);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)RGB(0, 0, 0);
wc.lpszClassName = L"crappy";
RegisterClassEx(&wc);

hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT, wc.lpszClassName, L"", WS_POPUP, rc.left, rc.top, s_width, s_height, NULL, NULL, wc.hInstance, NULL);

SetLayeredWindowAttributes(hWnd, RGB(0, 0, 0), 0, ULW_COLORKEY);
SetLayeredWindowAttributes(hWnd, 0, 255, LWA_ALPHA);

ShowWindow(hWnd, SW_SHOW);
initD3D(hWnd);
}

WPARAM MainLoop()
{
MSG msg;
RECT rc;

while (TRUE)
{
ZeroMemory(&msg, sizeof(MSG));
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}

if (msg.message == WM_QUIT)
exit(0);
twnd = NULL;
twnd = FindWindow(L"UnrealWindow", 0);
if (!twnd)
{
cout << "shutting" << endl;
Shutdown();
ExitProcess(0);
}
ZeroMemory(&rc, sizeof(RECT));
GetWindowRect(twnd, &rc);
s_width = rc.right - rc.left;
s_height = rc.bottom - rc.top;
MoveWindow(hWnd, rc.left, rc.top, s_width, s_height, true);

//render your esp
render();

Sleep(5);
}
return msg.wParam;
}

int main(int argc, char* argv[])
{
cout << hex << uppercase;
mem = new CMem(reinterpret_cast<HANDLE>(atoi(argv[1])));
atexit(Shutdown);
SetupWindow();
CacheNames();
//esp stuff
uint32_t ret = (uint32_t)MainLoop();
cin.get();
return ret;
}


求帮助
...全文

相关推荐

通信行业基于MongoDB的安全合规与性能优化:5G时序数据处理、可查询加密及窗口函数应用

内容概要:本文围绕MongoDB在通信行业的深度应用,系统讲解了可查询加密、时间序列集合、窗口函数与性能诊断四大核心技术。通过详实的代码案例,展示了如何利用可查询加密实现敏感数据合规存储与查询,使用时序集合高效处理5G网络KPI等高频写入场景,借助窗口函数进行经营指标的趋势分析,并结合explain()与查询分析器完成性能调优。文章还涵盖分片一致性检查、索引优化等运维实践,全面覆盖通信系统对安全、性能与扩展性的严苛要求。; 适合人群:具备一定数据库基础,从事通信行业研发、架构或运维工作1-3年的技术人员,尤其是参与5G网络监控、客户数据管理或大数据平台建设的相关人员。; 使用场景及目标:① 实现用户手机号、身份证等敏感信息的加密存储与等值查询,满足安全合规要求;② 构建高吞吐、低延迟的5G基站KPI时序数据存储与分析系统;③ 在数据库层直接完成滑动平均、累计求和等经营分析,减少应用层计算负担;④ 诊断慢查询、验证索引有效性,保障系统高性能运行。; 阅读建议:此资源强调理论与实战结合,建议读者在本地或测试环境部署MongoDB 7.0+版本,动手复现文中代码,重点关注schemaMap配置、时序集合参数选择与窗口函数语法细节,并结合explain执行计划理解底层优化机制,从而真正掌握通信级数据架构的设计精髓。

数智顾问

国央企创新负责人如何借助平台实现技术成果的高价值转化与资源精准配置?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

产业园区运营负责人如何在平台建设中科学配置创新资源,提升园区内技术对接效率?.docx

产业园区运营负责人如何在平台建设中科学配置创新资源,提升园区内技术对接效率?

BIZKEEN

产业园区运营负责人如何提升园区内技术供需匹配的精准度?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

高校技术转移办公室人员如何提升科技成果推介的效率与质量?.docx

科易网基于AI模型+行业大数据,在技术转移、成果转化、技术经纪、知识产权、产业创新、科技招商等垂直领域的多样化应用场景,推出科技创新领域的AI+工具与数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN
评论 2
收藏 已收藏
分享
返回顶部
weixin_40469559
C++ 语言 65,214 成员 250,514 内容