Results 1 to 3 of 3
  1. #1
    desa2k2's Avatar
    Join Date
    Jan 2008
    Posts
    11
    Reputation
    10
    Thanks
    1

    need help with c++ timer

    I need help making a working timer in c++ for stamina, and all the things that need to be freezed, here is what I got, see if you can help me out.

    Code:
    void memory()
    {
    HWND hWnd = FindWindow(0, "WarRock");
    GetWindowThreadProcessId(hWnd, &proc_id);
    hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, proc_id);
    }
    
    void CMyTrainer1Dlg::OnTimer(UINT nIDEvent) 
    {
    if (stamina == true)
    {
    	long staddy = 0x12F06C0;
    	short stoffset = 288;
    	float stvalue = 1120403456;
    	long stmaddy;
    	long stsaddy;
    	memory();
    	ReadProcessMemory(hProcess, (LPVOID*)(DWORD) staddy, &stmaddy, sizeof(stmaddy), NULL);
    	stsaddy = stmaddy + stoffset;
    	WriteProcessMemory(hProcess, (LPVOID*)(DWORD) stsaddy, &stvalue, sizeof(stvalue), NULL);
    }	
    	CDialog::OnTimer(nIDEvent);
    }
    
    void CMyTrainer1Dlg::OnStamOn() 
    {
    stamina = true;
    }
    
    void CMyTrainer1Dlg::OnStamOff() 
    {
    stamina = false;
    }
    Last edited by desa2k2; 02-05-2008 at 05:32 PM.

  2. #2
    vescovo's Avatar
    Join Date
    Sep 2007
    Location
    Hitlers Grave
    Posts
    1,403
    Reputation
    11
    Thanks
    145
    paste the whole code

  3. #3
    desa2k2's Avatar
    Join Date
    Jan 2008
    Posts
    11
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by vescovo View Post
    paste the whole code
    i added everything thats involved with the stamina timer, besides "bool stamina"

Similar Threads

  1. [Help Request] Need Help With A.V.A Error
    By ch1025 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 7
    Last Post: 05-14-2011, 09:15 AM
  2. [Help Request] Need help with making binds !
    By JonathanTBM in forum Vindictus Help
    Replies: 4
    Last Post: 05-10-2011, 07:40 PM
  3. [Help Request] Need help with numpad while recording macro !
    By JonathanTBM in forum Vindictus Help
    Replies: 2
    Last Post: 05-10-2011, 07:37 PM
  4. [Help Request] need help with mod
    By .:MUS1CFR34K:. in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 05-01-2011, 12:40 PM
  5. [Help Request] need help with modding
    By BayBee Alyn in forum Combat Arms Help
    Replies: 0
    Last Post: 04-27-2011, 09:06 PM

Tags for this Thread