Results 1 to 4 of 4
  1. #1
    InnovationTT's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    61
    Reputation
    10
    Thanks
    54
    My Mood
    Cynical

    How to use methods in AssemblyCsharp?

    So I'm completely new to this and I'm trying to hack a game called mini guns on steam. I opened up the Assembly-CSharp.dll in dnSpy and under a class called "CheatControl" there are literally hacks already made lol - there are methods that modify your manpower or give you gold (I assume these were made for debug purposes). But how do I use those methods? When I try to create an OnGUI() method it always makes it public extern void OnGUI(), which doesn't let me add anything to it. I can't find a way to get rid of the extern. Also sorry if this is a stupid question but where are the classes actually initialized (i.e. a new object is created)?

  2. #2
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Could you record a video of your process? I don't work with dnSpy often and don't have access to the game you're working with. But I might be able to help after seeing how you're adding the new method.
    Ah we-a blaze the fyah, make it bun dem!

  3. #3
    InnovationTT's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    61
    Reputation
    10
    Thanks
    54
    My Mood
    Cynical
    Quote Originally Posted by Hell_Demon View Post
    Could you record a video of your process? I don't work with dnSpy often and don't have access to the game you're working with. But I might be able to help after seeing how you're adding the new method.
    Idk why but suddenly it lets me remove the extern and still compiles without errors... weird. Anyways now I have the problem of the actual button not showing up in game, so I guess I gotta figure out which classes to create the OnGUI method for so that it actually shows up in game. Also is there a way to call a method from another class in the method of a class (e.g. Class A has method A1, can Class B's method B1 call A1 in C#)?

  4. #4
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by InnovationTT View Post
    Idk why but suddenly it lets me remove the extern and still compiles without errors... weird. Anyways now I have the problem of the actual button not showing up in game, so I guess I gotta figure out which classes to create the OnGUI method for so that it actually shows up in game. Also is there a way to call a method from another class in the method of a class (e.g. Class A has method A1, can Class B's method B1 call A1 in C#)?
    If it is a static method then yes, it's simply A.A1();
    If it's not a static method then you will need a reference to an instance of A
    Ah we-a blaze the fyah, make it bun dem!

Similar Threads

  1. [Request] AAnyone can post or teach me how to use flash disk method
    By sixtus333 in forum Point Blank Hacks
    Replies: 1
    Last Post: 08-16-2011, 06:34 AM
  2. How to Use Tsearch
    By wardo1926 in forum Hack Requests
    Replies: 5
    Last Post: 12-18-2007, 09:24 PM
  3. warrock addresses and how to use
    By ragman1234 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 04-15-2007, 12:38 PM
  4. Help! how to use ardamax keylogg
    By gmgundamx7 in forum WarRock - International Hacks
    Replies: 8
    Last Post: 02-28-2007, 04:43 PM
  5. How To Use A Render By Phate
    By Paolo1993 in forum Tutorials
    Replies: 0
    Last Post: 01-27-2006, 08:03 PM