Reading and searching the forums is the key. Read the Offsets sticky. Search for BlackMagic if you are doing it in C#. Read posts from Apoc, Cypher, Shynd, Kynox. Search for source in the bot section. The answer for your question is already here so there is no reason for asking again.
And because I was helped once.
Code:
/// <summary>
/// X, Y, Z
/// </summary>
public float X
{
get
{
_x = _magic.ReadFloat(_pointer + (uint)Constants.Offsets.X);
return _x;
}
}
public float Y
{
get
{
_y = _magic.ReadFloat(_pointer + (uint)Constants.Offsets.Y);
return _y;
}
}
public float Z
{
get
{
_z = _magic.ReadFloat(_pointer + (uint)Constants.Offsets.Z);
return _z;
}
}
/// <summary>
/// common offsets
/// </summary>
public enum Offsets : uint
{
X = 0x798,
Y = 0x79C,
Z = 0x7A0,
//...
};