Bool değil özür dilerim yanlış belirttim.Bool kullanarak döngüye alabilirsin
#include <stdio.h>
int main(){
int i,sayi,toplam;
printf(“Sayi Giriniz: “);
scanf(“%d”,&sayi);
i=0;
toplam=0;
do {
toplam+=i*i;
i++;
}while(i<sayi);
printf(“Toplam: %d”,toplam);
return 0;
}
Chat GPT ye sormayı dene. Herkesten daha bilgili kerata .dC++:#include <iostream> #include <vector> #include <format> #include "Header.h" #include <TlHelp32.h> DWORD ProcessIdAl(const char* UygulamaIsim) { DWORD ProcessId = 0; HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (hSnap != INVALID_HANDLE_VALUE) { PROCESSENTRY32 ProcessEntry; ProcessEntry.dwSize = sizeof(ProcessEntry); if (Process32First(hSnap, &ProcessEntry)) { do { if (!_strcmpi((ProcessEntry.szExeFile), UygulamaIsim)) { ProcessId = ProcessEntry.th32ProcessID; break; } } while (Process32Next(hSnap, &ProcessEntry)); } } CloseHandle(hSnap); return ProcessId; } uintptr_t PointerZinciriOku(HANDLE hProc, DWORD64 ptr, std::vector<unsigned int> offsets) { uintptr_t addr = ptr; for (unsigned int i = 0; i < offsets.size(); ++i) { std::cout << "Zincir address " << i + 1 << " : " << std::hex << addr << "\n"; bool Okundumu = ReadProcessMemory(hProc, (BYTE*)addr, &addr, sizeof(DWORD64), 0); std::cout << "Okundumu : " << Okundumu << "\n"; addr += offsets[i]; } return addr; } #ifdef _WIN64 static constexpr const auto PEB_OFFSET = 0x60; #else static constexpr const auto PEB_OFFSET = 0x30; #endif static constexpr const auto OyunIsim = "ProSoccerOnline-Win64-Shipping.exe"; int main() { DWORD ProcessID = ProcessIdAl("ProSoccerOnline-Win64-Shipping.exe"); std::cout << "Oyun ProcessID : " << std::hex << ProcessIdAl("ProSoccerOnline-Win64-Shipping.exe") << "\n"; if (!ProcessID) { std::cout << "Oyun ProcessID bulunamadi !" "\n"; return 0; } HANDLE OyunHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID); if (!OyunHandle) { std::cout << "Oyun HANDLE alinamadi !" "\n"; return 0; } DWORD Size = 0; PROCESS_BASIC_INFORMATION pbi; auto result = NtQueryInformationProc(OyunHandle, ProcessBasicInformation, &pbi, sizeof(PROCESS_BASIC_INFORMATION), &Size); PPEB PEB = pbi.PebBaseAddress; DWORD64 HedefAdress = ((DWORD64)PEB + 0x10); DWORD64 BaseAdress; ReadProcessMemory(OyunHandle, (void*)(HedefAdress), &BaseAdress, sizeof(DWORD64), 0); DWORD64 BaseAdress2 = (DWORD64)(GetModuleHandle("Console Application.exe")); std::cout << "Oyun Base : " << std::hex << BaseAdress << "\n"; std::cout << "Oyun PEB : " << std::hex << (DWORD64)PEB << "\n"; // if (!BaseAdress) { std::cout << "Modul base adresi bulunamadi !" "\n"; return 0; } std::cout << "Modul adresi : " << std::hex << BaseAdress << "\n"; uintptr_t EnAltAdres = (uintptr_t)BaseAdress + 0x46846E8; std::cout << "Son Hata :" << std::hex << GetLastError() << "\n"; auto SonucAdres = PointerZinciriOku(OyunHandle, EnAltAdres, { 0x8 , 0x20 , 0x260 , 0x1A0 , 0x60 , 0x1F8 }); std::cout << "Son Adress :" << std::hex << SonucAdres << "\n"; float Fov = 0; float IstedigimizFov = 140; ReadProcessMemory(OyunHandle, (void*)SonucAdres, &Fov, sizeof(float), 0); std::cout << std::format("Fov : {:.5} \n", Fov); while (true) { WriteProcessMemory(OyunHandle, (void*)SonucAdres, &IstedigimizFov, sizeof(float), 0); } return 0; }
Kodum bu ve sorunumdan bahsetmek istiyorum, kod'da herhangi bir sorunum yok aslında ama oyunda şöyle bir hata var kod pointer ve offsetlere bağlı olan fov'u 140'e dönüştürüyor ve ben bunu tekrarlamasını istiyorum, sadece 1 kereliğine değil her 5 saniyede bir offset ve pointerlara bağlı olan değeri 140 yapmasını istiyorum bunu nasıl yapabilirim? araştırdım ama herhangi bir sonuçla karşılaşmadım.
Bunu yapmak için Windows API'sindeki Sleep fonksiyonunu kullanabilirsinizKodum bu ve sorunumdan bahsetmek istiyorum, kod'da herhangi bir sorunum yok aslında ama oyunda şöyle bir hata var kod pointer ve offsetlere bağlı olan fov'u 140'e dönüştürüyor ve ben bunu tekrarlamasını istiyorum, sadece 1 kereliğine değil her 5 saniyede bir offset ve pointerlara bağlı olan değeri 140 yapmasını istiyorum bunu nasıl yapabilirim? araştırdım ama herhangi bir sonuçla karşılaşmadım.
while (true)
{
Kodunuz burada olacak hocam
Sleep(5000); // 5000 milisaniye (5 saniye) bekleyin
}
sağol teşekkürlerBunu yapmak için Windows API'sindeki Sleep fonksiyonunu kullanabilirsiniz
döngüye alabilirsin böyle
kodunuzu her 5 saniyede bir çalıştırarak offset ve pointerları kullanarak FOV'u 140'a dönüştürebilirsiniz.Kod:while (true) { Kodunuz burada olacak hocam Sleep(5000); // 5000 milisaniye (5 saniye) bekleyin }
doğrumu anladım böyle olmasınımı istiyorsun
Discord ADRESİM : skyzecheatdostum bu konu icin nereden bilgi alabilirim seninle özel bi iletisime gecsek olur mu