Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,184
    My Mood
    Bored

    How to make a trainer for black ops 2 [C++]

    Hey MPGH

    I want to show you guys how to make a trainer, BUT in c++ in a dll!

    1. Find the pointers / addresses!
    (Tutorial)
    *Video Removed due to Link/Advertising*

    So first you gonna do is open visual studio or visual c++.




    Then you are going to make a project.(Win32 Project -> DLL -> Empty Project)
    After that you done that you must create a new source file. I call it main.cpp(like everyone)...
    Then you include windows.h
    Code:
    #include <Windows.h>
    Thats the only include you need for a trainer for black ops 2...
    Now you add the basic dll structure:

    Code:
    BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH)
    	{
    		// code here
    	}
    	return true;
    }
    So... in black ops there are a secondary and a primary weapon... when you take another from the ground
    the values changing... so you must hold the value... you can do this by creating a thread with a unlimited loop(for(;)
    or while(1). I'll use for(;...

    So the actually code is:

    Code:
    #include <Windows.h>
    
    DWORD MyTutorialThread() // Our thread
    {
    	HANDLE t6sp = GetCurrentProcess(); // gets the process, the dll is injected in...
    
    	DWORD address1 = 0x0000000; // Must update the addresses xD
    	DWORD address2 = 0x0000000; // Must update the addresses xD
    	int value1 = 99999; // first value
    	int value2 = 99999; // second value
    
    	for(;;) // unlimited loop
    	{
    		WriteProcessMemory(t6sp, (LPVOID)address1, &value1, sizeof(DWORD), 0); // Writes in the memory
    		WriteProcessMemory(t6sp, (LPVOID)address2, &value2, sizeof(DWORD), 0); // Writes in the memory
    	}
    }
    
    BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH) // if dll is injected
    	{
    		CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)MyTutorialThread , NULL, NULL, NULL); // Creates the thread "MyTutorialThread"
    	}
    	return true;
    }
    Correct the addresses and then inject the dll with perx or whatever in your game(Black ops 2 single player)

    Credits:

    Me(Coding & writing the tutorial -.-)
    So have fun guys!
    Last edited by Jorndel; 06-25-2013 at 05:20 PM.

  2. #2
    Coper's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    BlackOps3.exe
    Posts
    449
    Reputation
    17
    Thanks
    3,346
    My Mood
    In Love
    fleep hacks -_- make ur own tut bro

    YOU ONLY LIVE ONCE


  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    I think you should provide credits when needed.
    Also, why are you using the API to write/read ?

    Your creating an inject hack. Yet you don't write to the game directly

    If I remember correctly all you have to do is:
    Code:
    *(int*)0x00000 = 0;
    (We set the value to '0' of the address we point to)
    Last edited by Jorndel; 06-25-2013 at 05:45 PM.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  4. #4
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,184
    My Mood
    Bored
    Quote Originally Posted by Jorndel View Post
    I think you should provide credits when needed.
    Also, why are you using the API to write/read ?

    Your creating an inject hack. Yet you don't write to the game directly

    If I remember correctly all you have to do is:
    Code:
    *(int*)0x00000 = 0;
    (We set the value to '0' of the address we point to)
    No this only works with an offset. i tested it

  5. #5
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,539
    My Mood
    Angelic
    Quote Originally Posted by Nik0815 View Post
    No this only works with an offset. i tested it
    I tested it with ammo, scorestreak and more.
    Works just fine

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  6. #6
    Threadstarter
    I'm not lazy, I just really enjoy doing nothing.
    Donator
    _PuRe.LucK*'s Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    idk bruh.
    Posts
    521
    Reputation
    71
    Thanks
    5,184
    My Mood
    Bored
    Quote Originally Posted by Coper View Post
    fleep hacks -_- make ur own tut bro
    omg dont spam please
    when you want a tutorial search for one -.-

    ---------- Post added at 05:57 AM ---------- Previous post was at 05:56 AM ----------

    Quote Originally Posted by Jorndel View Post
    I think you should provide credits when needed.
    Also, why are you using the API to write/read ?

    Your creating an inject hack. Yet you don't write to the game directly

    If I remember correctly all you have to do is:
    Code:
    *(int*)0x00000 = 0;
    (We set the value to '0' of the address we point to)
    And why credits thats the basics of c++ ._.

    ---------- Post added at 05:58 AM ---------- Previous post was at 05:57 AM ----------

    Quote Originally Posted by Jorndel View Post


    I tested it with ammo, scorestreak and more.
    Works just fine
    On Black Ops 2 single player?
    When this works thanks

  7. #7
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by Nik0815 View Post
    No this only works with an offset. i tested it
    Since you're doing a DLL, you can skip WriteProcessMemory as Jorndel said. You can directly use pointers.

    Code:
    #define WIN32_LEAN_AND_MEAN //We don't need to import the full WinAPI for such a simple trainer
    #include <Windows.h>
    
    DWORD MyTutorialThread() // Our thread
    {
    	// HANDLE t6sp = GetCurrentProcess(); // gets the process, the dll is injected in... - You don't need this.
    
    	DWORD address1 = 0x0000000; // Must update the addresses xD
    	DWORD address2 = 0x0000000; // Must update the addresses xD
    	int value1 = 99999; // first value
    	int value2 = 99999; // second value
    
    	for(;;) // unlimited loop
    	{
    		*(int*)address1 = value1; //DWORD = unsigned long = int
    		*(int*)address2 = value2; //Format: *(ValueType*)Address = value;
    		Sleep(100); //Sleep as your thread will make the game lag or cause ALOT of CPU usage
    	}
    }
    
    BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
    {
    	if(dwReason == DLL_PROCESS_ATTACH) // if dll is injected
    	{
    		CreateThread(NULL, NULL,(LPTHREAD_START_ROUTINE)MyTutorialThread , NULL, NULL, NULL); // Creates the thread "MyTutorialThread"
    	}
    	return true;
    }
    Last edited by Kenshin13; 06-26-2013 at 11:48 PM.

  8. #8
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,643
    Reputation
    748
    Thanks
    1,818
    My Mood
    Doh
    Why putting an infinite loop if you're going to change one or two variables in-game? (like experience etc)
    Quote Originally Posted by KING View Post
    Stop FACKING SUMMONING ME TO THESE FUCKTARDS CONVOS.
    DAFUQ IS DIS FACKING SHYT.
    SHYT MAKES NO SENSE.

    On a side note. You fags are fucking hatting.
    You guys don't know shyt about spam.
    Danny would post on everysingle post every fucking hour, you couldnt tell which post was recent or anything. It was a fuck fest, he wouldnt have shyt to say....cares he posted like a fag he is.

    Josh made mutiple threads a day. And not just G, everywhere. That why everyone liked that dumb nikka.

    @Richard Nixon -Are you Endrat? @REAP @Digits2012 @Ghost -Son...I am dissapoint @Sjoerd -SMD @Canadian @FrosK -Dumb name is dumb @Nebulaa @That_Kid -Man Up @The XXX Devil -Oh look another joker avatar-how original and neat

    The rest who I didn't mention comment....Suck my left nut....but not to hard...it hurts.

  9. #9
    Diamond's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    CoD Section
    Posts
    2,225
    Reputation
    200
    Thanks
    2,523
    My Mood
    Devilish
    Give proper credit where it's due next time to Fleep Hacks. And he wasn't spamming, he was telling the truth. Nonetheless, nice tut.
    Instagram: fadi.ovo

    Twitter: @byFadi

    YouTube: OVO MobZai

  10. #10
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by Kenshin13 Jr View Post
    Give proper credit where it's due next time to Fleep Hacks. And he wasn't spamming, he was telling the truth. Nonetheless, nice tut.
    So you mean EVERYONE learns from a single guy's tutorials? This is so basic credits aren't even required. If they are, you should credit the original C++ creator and Microsoft for API implementation.

    Quote Originally Posted by ლ(ಠ_ಠლ) View Post
    Why putting an infinite loop if you're going to change one or two variables in-game? (like experience etc)
    Because some values may reset at the end of a game.

  11. #11
    Diamond's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    CoD Section
    Posts
    2,225
    Reputation
    200
    Thanks
    2,523
    My Mood
    Devilish
    Quote Originally Posted by Kenshin13 View Post


    So you mean EVERYONE learns from a single guy's tutorials? This is so basic credits aren't even required. If they are, you should credit the original C++ creator and Microsoft for API implementation.


    Because some values may reset at the end of a game.
    Hmm... Right right so he should at least mention the video isn't his, it's only fair. If I did it I would get banned for copying or something stupid, but whatever...
    Instagram: fadi.ovo

    Twitter: @byFadi

    YouTube: OVO MobZai

  12. #12
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,643
    Reputation
    748
    Thanks
    1,818
    My Mood
    Doh
    Quote Originally Posted by Kenshin13 View Post


    So you mean EVERYONE learns from a single guy's tutorials? This is so basic credits aren't even required. If they are, you should credit the original C++ creator and Microsoft for API implementation.



    Because some values may reset at the end of a game.
    The DLLs will unload at some point during the end of the game (when you close the process), will this make that loop useless?
    Quote Originally Posted by KING View Post
    Stop FACKING SUMMONING ME TO THESE FUCKTARDS CONVOS.
    DAFUQ IS DIS FACKING SHYT.
    SHYT MAKES NO SENSE.

    On a side note. You fags are fucking hatting.
    You guys don't know shyt about spam.
    Danny would post on everysingle post every fucking hour, you couldnt tell which post was recent or anything. It was a fuck fest, he wouldnt have shyt to say....cares he posted like a fag he is.

    Josh made mutiple threads a day. And not just G, everywhere. That why everyone liked that dumb nikka.

    @Richard Nixon -Are you Endrat? @REAP @Digits2012 @Ghost -Son...I am dissapoint @Sjoerd -SMD @Canadian @FrosK -Dumb name is dumb @Nebulaa @That_Kid -Man Up @The XXX Devil -Oh look another joker avatar-how original and neat

    The rest who I didn't mention comment....Suck my left nut....but not to hard...it hurts.

  13. #13
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by ლ(ಠ_ಠლ) View Post


    The DLLs will unload at some point during the end of the game (when you close the process), will this make that loop useless?
    If you unload the DLL or close the game...obviously the loop would be useless as it'll stop the entire thing...

  14. #14
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    8,643
    Reputation
    748
    Thanks
    1,818
    My Mood
    Doh
    Quote Originally Posted by Kenshin13 View Post

    If you unload the DLL or close the game...obviously the loop would be useless as it'll stop the entire thing...
    So why put a loop when it's going to end at some point and the values will get back as they were? What I'm trying to say is that if the value is changed only when the DLL is loaded then I guess hex editing will do the work and keep the value the same even if the DLL is injected or not.
    Quote Originally Posted by KING View Post
    Stop FACKING SUMMONING ME TO THESE FUCKTARDS CONVOS.
    DAFUQ IS DIS FACKING SHYT.
    SHYT MAKES NO SENSE.

    On a side note. You fags are fucking hatting.
    You guys don't know shyt about spam.
    Danny would post on everysingle post every fucking hour, you couldnt tell which post was recent or anything. It was a fuck fest, he wouldnt have shyt to say....cares he posted like a fag he is.

    Josh made mutiple threads a day. And not just G, everywhere. That why everyone liked that dumb nikka.

    @Richard Nixon -Are you Endrat? @REAP @Digits2012 @Ghost -Son...I am dissapoint @Sjoerd -SMD @Canadian @FrosK -Dumb name is dumb @Nebulaa @That_Kid -Man Up @The XXX Devil -Oh look another joker avatar-how original and neat

    The rest who I didn't mention comment....Suck my left nut....but not to hard...it hurts.

  15. #15
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by ლ(ಠ_ಠლ) View Post


    So why put a loop when it's going to end at some point and the values will get back as they were? What I'm trying to say is that if the value is changed only when the DLL is loaded then I guess hex editing will do the work and keep the value the same even if the DLL is injected or not.
    The DLL will only unload if you manually do it. It will keep the values constant until you remove it (Unload) or close the game. Values change sometimes so if you do hex edit it, you'll need to do it over and over every time the value resets (As I've experienced them resetting every 5 minutes.) Hence an infinite loop.

    So what you're saying makes no sense unless you see no problem hex editing every 5 minutes or so. This is why there's a loop.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Outdated] Unlock Tokens Trainer for Black Ops 2 V26 by RedRuez [MPGH.net]
    By RedRuez in forum Call of Duty - Black Ops 2 (BO2) Hacks & Cheats
    Replies: 5
    Last Post: 05-24-2013, 09:50 AM
  2. Can anyone post a guide of how to use the cracked to servers for black ops ?
    By PhotoLightFilms in forum Call of Duty Black Ops Help
    Replies: 1
    Last Post: 11-06-2011, 03:04 AM
  3. Someone should make VIP for Black ops
    By youngloveb14 in forum General
    Replies: 3
    Last Post: 05-14-2011, 12:10 AM
  4. [INFO] How to correctly post hacks/mods for Black Ops
    By spiritwo in forum Call of Duty Black Ops Discussions
    Replies: 43
    Last Post: 11-07-2010, 11:28 AM
  5. How to make C++ trainers for Warrock
    By cjg333 in forum C++/C Programming
    Replies: 52
    Last Post: 10-15-2008, 11:10 AM