Jump to content

» «


No replies to this topic
  • casshem

    Player Hater

  • Members
  • Joined: 31 Jul 2010


Posted 01 May 2013 - 05:54 PM

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.

#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.gtamoddin..._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!

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users