• Categories

  • Pages

  • Tags

  • Archives

  • Meta

  • Awesome Tutorial – Creating a Game Trainer in C# (Detecting an instance)

    Posted by admin on January 18th, 2010 and filed under game trainer | 25 Comments »

    The first of hopefully many C# trainer tutorials!

    Here is the code!

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace sdfgsdfgfdsg
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
    System.Diagnostics.Process[] myprocess = System.Diagnostics.Process.GetProcessesByName(”notepad”);

    if (myprocess.Length != 0)
    {
    button1.Enabled = true;
    }
    else
    {
    button1.Enabled = false;
    }
    }

    private void Form1_Load(object sender, EventArgs e)
    {
    timer1.Enabled = true;

    timer1.Interval = 50;
    }
    }
    }

    Duration : 0:5:42


    [youtube srFi0RI_tdY]

    25 Responses

    1. ddoodm Says:

      Ok. Good enough …
      Ok. Good enough reason. :)

      Thanks for the input! :)

    2. dbug64 Says:

      @ddoodm Well, when …
      @ddoodm Well, when programs get bigger the details so easily get drowned in too verbose code. My line is 1/8th of yours, when I read other people’s code I have to stop, and figure out these 8 lines.

      My one-liner is more obvious, it has something to do with Enabling a button.

      If that’s what I’m looking for, I can concentrate on the expression to the right of the equal sign, otherwise just keep skimming the code.

    3. ddoodm Says:

      Yeah. :) I guess ur …
      Yeah. :) I guess ur right. But, I don’t see any difference for the end user. :) They both seem to do the same job. :)

    4. dbug64 Says:

      Never do an if() …
      Never do an if() true else false.

      button1.Enabled = process.Length != 0;

    5. RockIsK1ckAss Says:

      You deserv it
      You deserv it

    6. ddoodm Says:

      Hey! Thanks a ton …
      Hey! Thanks a ton for subscribing!!! I really appreciate your support!! Yea, I’d really like to get back to this series. There just seems to be more call for GTA tuts. :)

      Thanks again for the sub and the comment!!

    7. ddoodm Says:

      Thanks a ton for …
      Thanks a ton for the sub!!! I really appreciate your support!!!!

    8. deathglare00 Says:

      Nice video I’d like …
      Nice video I’d like to see some more C# tutorials, have subscribed

    9. RockIsK1ckAss Says:

      Like it 5 stars+sub
      Like it 5 stars+sub

    10. H3Hmovies Says:

      what is a game …
      what is a game trainer

    11. xXCraZyHackZxX Says:

      Hey man what …
      Hey man what program are you using? i know a part of it is notepad but whats all the other stuff around it?

    12. ddoodm Says:

      lol! Yeah. Ok then …
      lol! Yeah. Ok then smart guy. :P It’s a typo. :)

      Thanks for the comment!

    13. gompi6 Says:

      U got a mistake in …
      U got a mistake in your description (the code)
      U wrote this :
      System.Diagnostics.Process[] myprocess = System.Diagnostics.Process.GetProcessesB yName(”notepad”);
      But its need to be:
      System.Diagnostics.Process[] myprocess = System.Diagnostics.Process.GetProcessesByName(”notepad”);

      U made a mistake at the GetProcessByName.

      But Good video it helped me alot thx dude!!

    14. ddoodm Says:

      Oooh! :D Windows …
      Oooh! :D Windows hacking! That sounds a bit intense!! I’ve messed around with the login screen a bit,but obviously, your doing more advanced stuff than that! :D

    15. foteye1 Says:

      cool. No worries. …
      cool. No worries. Just send me a youtube message or… whatever. And i’ll try get back to you with the answer.

      PS: i stopped hacking games a while ago. I started messing with windows’ registry a short time after that.

    16. ddoodm Says:

      Ah ok. :) I see …
      Ah ok. :) I see what your saying. :) I’m a bit busy too. :) Gotta do a school project. :)

      Oh cool! C++! Cpp is tricky though! I mean, it’s great because of it’s flexibility, but for me, it’s way too hard! :)

      I would LOVE help with Cpp! I really appreciate that!! I’ve got a question too! I’ll ask tomorrow though. :) Really should be getting to this project.

      Anyways! Thanks for the offer! Happy hacking!

    17. foteye1 Says:

      ah ok. I was gonna …
      ah ok. I was gonna get u on msn, because I’m a bit busy. I’m making a windows game (trying to…) its a bit like the game pocket tanks. But differs a fair bit. You should make a C# series. I mainly do C++ but theyre more or less the same. I could give you a hand with it if you are serious about it =)

    18. ddoodm Says:

      lol! I don’t have a …
      lol! I don’t have a XBox anyways! :)

      Nah! Spamming is fine! :) Boosts up both the comment count and the view count!! Oh yeah, and I don’t really use MSN, or any IM service. :) Soz. :)

    19. foteye1 Says:

      yeah i’d show you …
      yeah i’d show you the arcade game. But the only way to get it on YOUR xbox, is by publishing it. And they wouldnt publish it. It was controller hero. Guitar hero for the controller. =)

      Well, if you like. I’m kinda spamming your videos. So you should add my msn. So i dont get a whole bunch of randoms adding me I’ll send you a pm. We can talk more about this stuff =)

    20. ddoodm Says:

      Haha! Alright! …
      Haha! Alright! Thanks!! :D Really appreciate all that! :)

      Oh cool! An XBox arcade? WOW! That’s amazing!! Love the sound of that!! I really want to see that!!

      Yeah, I would love to do a series, but there is soooo much demand for other stuff. No one really cares about a trainer. :( Oh well…. I’ll do some soon!!

      Thanks again! Happy hacking!!

    21. foteye1 Says:

      i really like this. …
      i really like this. I’ve been relying on Cheat Engine, MHS and TMK. Really good. Ive been messing with C++/C# with mainly boring apps (and one xbox arcade game which never got published). I never realised it could do this. Really good – i seriously reckon you should do a series.

    22. ddoodm Says:

      Yeah! I would LOVE …
      Yeah! I would LOVE to do a series! :) Just need a bit of time. :) Been really busy. :)

      Should be able to do another one soon!!!

      Happy programming!

    23. GameTrailerHDQ Says:

      i have always …
      i have always wondered how to make game trainers. You should make a series out of this and show us examples of trainers that you can make right now for example a san andreas trainer which activates cheat codes with a touch of a hotkey

    24. ddoodm Says:

      VB is pretty …
      VB is pretty powerful too I guess. :)

    25. MisterTutorialKid Says:

      yeah.
      yeah.

    Leave a Comment

    Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.