IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
  Reply to this topicStart new topicStart Poll

 C#

 Collecting players coords in sa
 
The_Sorrow  
Posted: Thursday, Dec 29 2011, 11:55
Quote Post


Heaven, I'm in heaven(8)
Group Icon
Group: Members
Joined: May 31, 2010

en.gif

XXXXX



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.
Users WebsitePMMSN
  Top
 

 
K^2  
Posted: Thursday, Dec 29 2011, 16:10
Quote Post


Vidi Vici Veni
Group Icon
Group: Zaibatsu
Joined: Apr 14, 2004

us.gif

Member Award




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.
PMMSN
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG