Jump to content

C#


Node

Recommended Posts

How would this be done? do you have to open the exe and search for a memory address containing the players current location?

 

I have no idea, but sanny builder has done it so it can be done.

Link to comment
Share on other sites

What you do is build a dynamic library in any language you're happy with. Rename the .dll file to .asi, and place it in the same directory as SA executable. The .asi files get loaded when the game starts, allowing you to perform some actions with DllMain. Since the library will be loaded in the same virtual memory space as the game, it will have access to all of the variables, including player location. At this point, all you have to do is look up the virtual address for the variable you're interested in and read it.

 

Of course, the DllMain will only run once. If you want your code executed while the game runs, you must hook into the code. There are several ways to do that. From .asi you can replace callbacks to intercept key strokes and such. So if you want your code executed on key stroke, that's the easiest way. You can also hook into game's function calls, but you need to know a bit of assembly for that. Finally, you can create a fake d3d9.dll, which lets you hook into any graphics call. If you want your code executed per-frame, it's a good way to do that, but you need to understand a bit of DirectX programming for that.

Prior to filing a bug against any of my code, please consider this response to common concerns.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.