Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    It was before but not anymore. I thought that because if I changed the M to a lowercase the code would compile.
    Use god damn code tags.

    Just like you quote people, exchange the QUOTE with CODE and put your code inbetween.

    Code:
    #include <Windows.h>
    #include <iostream>
    #include "ProcMem.h"
    
    ProcMem Mem;
    
    DWORD ClientDllBase = 0;
    
    const DWORD dwLocalPlayer = 0x4EDF554;
    const DWORD dwEntityList = 0x4A4BA54;
    const DWORD dwForceAttack = 0x2E8BA38;
    const DWORD m_iHealth = 0xFC;
    const DWORD m_iCrossHairID = 0xAA44;
    const DWORD m_iTeamNum = 0xF0;
    const DWORD EntityLoopDistance = 0x10;
    
    void Triggerbob()
    {
    	DWORD Entity = 0;
    	DWORD LocalPlayer = Mem.Read< DWORD >(ClientDllBase + dwLocalPlayer);
    	int CrossHairID = Mem.Read< int >(LocalPlayer + m_iCrossHairID);
    
    	if (Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    		&& Mem.Read< int >(Entity + m_iHealth) > 0
    		&& Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum))
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    }
    
    int main()
    {
    	Mem.Process("csgo.exe");
    	ClientDllBase = Mem.Module("client.dll");
    	while ("This is pasted" != "off of MPGH")
    	{
    		Triggerbob();
    		Sleep(1);
    	}
    
    	return EXIT_SUCCESS;
    }

    Try the above code again, because i don't see any problem right now.

  2. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

  3. #17
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    After some 'testing' it appears the problem is something to do with the if statement. The line to attack works fine but the if statement does not.

    To test this I used using namespace std;(for the test only) and put within the if condition to cout a random piece of text AND the attack but to my not-so suprise , the text was nout outputted to the console either so it must be the if statement right?

  4. #18
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    After some 'testing' it appears the problem is something to do with the if statement. The line to attack works fine but the if statement does not.

    To test this I used using namespace std;(for the test only) and put within the if condition to cout a random piece of text AND the attack but to my not-so suprise , the text was nout outputted to the console either so it must be the if statement right?
    Could you post what you tried to do there?

  5. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

  6. #19
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    The code you posted still , for some reason , does not work. I am running csgo in windowed mode. Coudl that be it?

    Also what I tried to do:

    I just put while 1 is equal to 1 then write attack. It worked becuase as soon as I went in game the gun just started spraying making it obvious that the command to attack worked. I did this in the main function before calling trigger bot.

    For the cout thing. I did this


    if (Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    && Mem.Read< int >(Entity + m_iHealth) > 0
    && Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum))
    cout << "display something if this worked" << endl; //except this did not occur when I aimed at an enemy
    Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    }

    Also how do I use quote tags?
    Last edited by fuhuifhsiuhfiegbfi; 06-21-2016 at 03:53 PM.

  7. #20
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    The code you posted still , for some reason , does not work. I am running csgo in windowed mode. Coudl that be it?
    No.

    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    For the cout thing. I did this

    //code here
    This code shouldn't even compile, since you're lacking an opening brace.



    Try this:

    Code:
    #include <Windows.h>
    #include <iostream>
    #include "ProcMem.h"
    
    ProcMem Mem;
    
    DWORD ClientDllBase = 0;
    
    const DWORD dwLocalPlayer = 0x4EDF554;
    const DWORD dwEntityList = 0x4A4BA54;
    const DWORD dwForceAttack = 0x2E8BA38;
    const DWORD m_iHealth = 0xFC;
    const DWORD m_iCrossHairID = 0xAA44;
    const DWORD m_iTeamNum = 0xF0;
    const DWORD EntityLoopDistance = 0x10;
    
    void Triggerbob()
    {
    	DWORD Entity = 0;
    	DWORD LocalPlayer = Mem.Read< DWORD >(ClientDllBase + dwLocalPlayer);
    	int CrossHairID = Mem.Read< int >(LocalPlayer + m_iCrossHairID);
    
    	if (Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    		&& Mem.Read< int >(Entity + m_iHealth) > 0
    		&& Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum))
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    }
    
    int main()
    {
    	Mem.Process("csgo.exe");
    	ClientDllBase = Mem.Module("client.dll");
    	while ("This is pasted" != "off of MPGH")
    	{
    		Triggerbob();
    		Sleep(1);
    	}
    
    	return EXIT_SUCCESS;
    }

    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    Also how do I use quote tags?
    Just like you quote.

    [ CODE ] //MY CODE HERE [ /CODE ]

    Just that there are no spaces between [, CODE, ], [, /CODE and ].

  8. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

  9. #21
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    Quote Originally Posted by WasserEsser View Post
    This code shouldn't even compile, since you're lacking an opening brace.
    The closing brace was to end the triggerbob function.

    Also I tried that code and it compiled but still it did not work.

    Are you sure those offsets are right? Because I just dumped them again now and for dwLocalPlayer is 0x00A30504 but in the code you posted the offset for local player is 0x4EDF554?

  10. #22
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    The closing brace was to end the triggerbob function.
    I wasn't talking about the closing brace. You can only have one statement for an if statement without braces.

    Code:
    if ( a )
          return; // works
    
    if ( b ) 
          bla( );
          return; // doesn't work
    
    if ( c ) 
    {
          bla( );
          return; // works
    }
    If your code compiled, then your compiler saw the Mem.Write statement as not part of the if statement, which would have meant that it should've shot every time, without the if statement having any effect onto it.

    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    Are you sure those offsets are right? Because I just dumped them again now and for dwLocalPlayer is 0x00A30504 but in the code you posted the offset for local player is 0x4EDF554?
    They are correct, the LocalPlayer pointer i'm using is a different pointer which points to the same address.

  11. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

  12. #23
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    I see. So the if statement would need braces?

    Code:
     if (Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    		&& Mem.Read< int >(Entity + m_iHealth) > 0
    		&& Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum)){
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    	}
    Like this?

    Because this is the only way I can add them without an error.

  13. #24
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    I see. So the if statement would need braces?

    Code:
     if (Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    		&& Mem.Read< int >(Entity + m_iHealth) > 0
    		&& Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum)){
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    	}
    Like this?

    Because this is the only way I can add them without an error.
    It doesn't matter for the above if statement, since it only has one statement. ( Mem.Write< int >(ClientDllBase + dwForceAttack, 6); )

  14. #25
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    But even without braces it does not shoot at the enemy?

  15. #26
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Quote Originally Posted by fuhuifhsiuhfiegbfi View Post
    But even without braces it does not shoot at the enemy?
    The last thing i can think of, try moving Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance) out of the if statement and move it at the line above.

    Code:
    #include <Windows.h>
    #include <iostream>
    #include "ProcMem.h"
    
    ProcMem Mem;
    
    DWORD ClientDllBase = 0;
    
    const DWORD dwLocalPlayer = 0x4EDF554;
    const DWORD dwEntityList = 0x4A4BA54;
    const DWORD dwForceAttack = 0x2E8BA38;
    const DWORD m_iHealth = 0xFC;
    const DWORD m_iCrossHairID = 0xAA44;
    const DWORD m_iTeamNum = 0xF0;
    const DWORD EntityLoopDistance = 0x10;
    
    void Triggerbob()
    {
    	DWORD Entity = 0;
    	DWORD LocalPlayer = Mem.Read< DWORD >(ClientDllBase + dwLocalPlayer);
    	int CrossHairID = Mem.Read< int >(LocalPlayer + m_iCrossHairID);
    	Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance)
    
    	if (Mem.Read< int >(Entity + m_iHealth) > 0 && Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum))
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    }
    
    int main()
    {
    	Mem.Process("csgo.exe");
    	ClientDllBase = Mem.Module("client.dll");
    	while ("This is pasted" != "off of MPGH")
    	{
    		Triggerbob();
    		Sleep(1);
    	}
    
    	return EXIT_SUCCESS;
    }

  16. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

  17. #27
    fuhuifhsiuhfiegbfi's Avatar
    Join Date
    Apr 2016
    Gender
    male
    Posts
    39
    Reputation
    10
    Thanks
    17
    THANK GOD! It finally works! Thank you very much!

    You don't know how long I've been trying to do this for! Thank you!

  18. #28
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    I don't know why that caused the error, since it's within the standards.

    So, to sum it up, the rules for variable declaration in a selection-statement are:

    1. can only have 1 variable declared per expression,
    2. the variable declaration must occur first in the expression and
    3. can’t have parenthesis around declaration ( as per the syntax specification)
    Whatever, glad that worked for you.

    EDIT: It doesn't get evaluated correctly because the && operator has higher precedence, thus resulting in the bold thing to evaluate first.

    Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance) && Mem.Read< int >(Entity + m_iHealth) > 0

    If you want, you can use

    Code:
    if ((Entity = Mem.Read< DWORD >(ClientDllBase + dwEntityList + CrossHairID * EntityLoopDistance))
    		&& Mem.Read< int >(Entity + m_iHealth) > 0
    		&& Mem.Read< int >(Entity + m_iTeamNum) != Mem.Read< int >(LocalPlayer + m_iTeamNum))
    		Mem.Write< int >(ClientDllBase + dwForceAttack, 6);
    Last edited by WasserEsser; 06-21-2016 at 05:21 PM.

  19. The Following User Says Thank You to WasserEsser For This Useful Post:

    fuhuifhsiuhfiegbfi (06-21-2016)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Info] What does and does not work after the Episode 8 P1 patch
    By HoLyNeSs in forum Vindictus Discussions
    Replies: 40
    Last Post: 07-18-2011, 04:43 AM
  2. Replies: 6
    Last Post: 04-28-2011, 12:53 AM
  3. My vip hack does not work
    By Thetoiletguy911 in forum General Hacking
    Replies: 2
    Last Post: 12-16-2008, 12:15 PM
  4. Does not work
    By nepalarmy in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 10-29-2008, 04:37 PM
  5. warrock does not work fore me?
    By Thetoiletguy911 in forum Suggestions, Requests & General Help
    Replies: 2
    Last Post: 06-06-2008, 08:23 AM