Триггер без проверки на оружие, придётся это дописать самим
C++:
void trigger_module() {
uint32_t cs2_process_id = get_process_id_by_name("cs2.exe");
HANDLE cs2_process_handle = OpenProcess(PROCESS_ALL_ACCESS, 0, cs2_process_id);
uintptr_t cs2_module_client = get_module_base(cs2_process_id, "client.dll");
auto local_player = memory_read<uintptr_t>(cs2_process_handle, cs2_module_client + offsets::dwLocalPlayerPawn);
auto crosshair_ent = memory_read<int>(cs2_process_handle, local_player + offsets::m_iIDEntIndex);
if (!crosshair_ent || !local_player)
return;
POINT p;
for (int i = 0; i <= 64; i++) {
if (crosshair_ent != -1) {
GetCursorPos(&p);
mouse_event(MOUSEEVENTF_LEFTDOWN, p.x, p.y, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, p.x, p.y, 0, 0);
}
}
}