casshem Posted May 1, 2013 Share Posted May 1, 2013 I've been trying to get a piece of code to work, but unfortunately, I don't understand the way memory addresses work. I basically trying to make an autoit script that adds a certain value to the current player x y z position. I'm stuck trying to figure out how I would do that. This is basically all I have atm. #RequireAdmin#include <NomadMemory.au3>$iv_Pid = 3568$iv_Address = 0xB6F5F0;Player X pos :$ah_Handle = _MemoryOpen ($iv_Pid)_MemoryRead ($iv_Address,$ah_Handle)_MemoryWrite ($iv_Address, $ah_Handle, '$iv_Address' + 10.0)_MemoryClose ($ah_Handle) $iv_Pid = 3568 is the .exe for SAMP and 0xB6F5F0 is the Player pointer. From http://www.gtamodding.com/index.php?title=..._Addresses_(SA) In most cases, you can use even the dword of playeraddress as CPed value CPed +0x14 = Pointer to XYZ position structure (and rotation) (CPed+0x14) +0x0 to +0x2C = [dword] Is the rotation matrix (CPed+0x14) +0x30 = [dword] XPos (CPed+0x14) +0x34 = [dword] YPos (CPed+0x14) +0x38 = [dword] ZPos I'm not really sure how I would use the information above to change the x y z positions. I'd appreciate it if someone could help me out a bit. Thank you in advance! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now