Difference between revisions of "Memory Addresses (GTA4)"
Jump to navigation
Jump to search
Thacursedpie (talk | contribs) (→Structures) |
|||
Line 23: | Line 23: | ||
VECTOR unkVector; // 0x20 | 32 | VECTOR unkVector; // 0x20 | 32 | ||
VECTOR position; // 0x30 | 48 | VECTOR position; // 0x30 | 48 | ||
+ | };</source> | ||
+ | |||
+ | ===WEAPON=== | ||
+ | The following is how the structure containing each weapon's properties looks like. | ||
+ | Info was obtained from GTA:IV v1.0.7.0. First entry is "UNARMED" at 0x024D0A34. Offset of next entry is +0x110, et cetera. | ||
+ | |||
+ | NOTE: work in progress :) | ||
+ | |||
+ | <source lang="cpp">struct WEAPON | ||
+ | { | ||
+ | // slottype (index of array element) | ||
+ | int slot; // 0x0 | 0 | ||
+ | |||
+ | // firetype (index of array element) | ||
+ | int firetype; // 0x4 | 4 | ||
+ | |||
+ | // damagetype (index of array element) | ||
+ | int damagetype; // 0x8 | 8 | ||
+ | |||
+ | // group (index of array element | ||
+ | int group; // 0xC | 12 | ||
+ | |||
+ | float targetrange; // 0x10 | 16 | ||
+ | float weaponrange; // 0x14 | 20 | ||
+ | float aimaccuracy; // 0x30 | 48 | ||
+ | float offset_x; // 0x3C | 52 | ||
+ | float offset_y; // 0x40 | 56 | ||
+ | float offset_z; // 0x44 | 60 | ||
+ | float crouchoffset_x; // 0x4C | 76 | ||
+ | float crouchoffset_y; // 0x50 | 80 | ||
+ | float crouchoffset_z; // 0x54 | 84 | ||
+ | float reticule_standing; // 0x60 | 96 | ||
+ | float reticule_ducked; // 0x64 | 100 | ||
+ | float reticule_scale; // 0x68 | 104 | ||
+ | int pickup_regentime; // 0x74 | 116 | ||
+ | |||
+ | // damage: | ||
+ | int damage; // 0x7E | 126 | ||
+ | |||
+ | int ammomax; // 0x84 | 132 | ||
+ | int timebetweenshots; // 0x88 | 136 | ||
+ | float physicsforce; // 0x8C | 140 | ||
+ | int reloadtime_normal; // 0x90 | 146 | ||
+ | int reloadtime_fast; // 0x94 | 150 | ||
+ | int reloadtime_crouch; // 0x98 | 154 | ||
+ | |||
+ | // damage, continued: | ||
+ | float networkplayermod; // 0xEC | 236 | ||
+ | float networkpedmod; // 0xF0 | 240 | ||
};</source> | };</source> | ||
Revision as of 21:32, 8 March 2011
GTA4 for PC Memory Addresses
Contents
Structures
A list of Structures that occur in GTA IV's memory.
VECTOR
struct VECTOR
{
float x; // 0x0 | 0
float y; // 0x4 | 4
float z; // 0x8 | 8
float unk;
};
CVector
struct CVector
{
VECTOR bodyHeading; // 0x0 | 0
VECTOR visionHeading; // 0x10 | 16
VECTOR unkVector; // 0x20 | 32
VECTOR position; // 0x30 | 48
};
WEAPON
The following is how the structure containing each weapon's properties looks like. Info was obtained from GTA:IV v1.0.7.0. First entry is "UNARMED" at 0x024D0A34. Offset of next entry is +0x110, et cetera.
NOTE: work in progress :)
struct WEAPON
{
// slottype (index of array element)
int slot; // 0x0 | 0
// firetype (index of array element)
int firetype; // 0x4 | 4
// damagetype (index of array element)
int damagetype; // 0x8 | 8
// group (index of array element
int group; // 0xC | 12
float targetrange; // 0x10 | 16
float weaponrange; // 0x14 | 20
float aimaccuracy; // 0x30 | 48
float offset_x; // 0x3C | 52
float offset_y; // 0x40 | 56
float offset_z; // 0x44 | 60
float crouchoffset_x; // 0x4C | 76
float crouchoffset_y; // 0x50 | 80
float crouchoffset_z; // 0x54 | 84
float reticule_standing; // 0x60 | 96
float reticule_ducked; // 0x64 | 100
float reticule_scale; // 0x68 | 104
int pickup_regentime; // 0x74 | 116
// damage:
int damage; // 0x7E | 126
int ammomax; // 0x84 | 132
int timebetweenshots; // 0x88 | 136
float physicsforce; // 0x8C | 140
int reloadtime_normal; // 0x90 | 146
int reloadtime_fast; // 0x94 | 150
int reloadtime_crouch; // 0x98 | 154
// damage, continued:
float networkplayermod; // 0xEC | 236
float networkpedmod; // 0xF0 | 240
};
Classes
A list of Classes that occur in GTA IV's memory.
scrThread
class scrThread
{
public:
virtual ~scrThread();
virtual int reset(int i1,int i2,int i3);
virtual int run(int i1);
virtual int loop(int i1);
virtual int closeDown();
DWORD threadId;
DWORD scriptHash;
DWORD state;
DWORD IP;
DWORD currentFrame;
DWORD SP;
DWORD timerA;
DWORD timerB;
DWORD timerC;
float waitTime;
BYTE zPadding1[28];
DWORD exIP;
DWORD exFrameSP;
BYTE zPadding2[4];
void* stack;
BYTE zPadding3[4];
void* XLiveBuffer;
BYTE zPadding4[8];
char* exitMessage;
char programName[54];
BYTE zPadding5[14];
bool saveScript;
bool playerControlOnInMissionCleanup;
bool clearHelpInMissionCleanup;
BYTE zPadding6[1];
bool allowNonMinigameTextMessages;
BYTE zPadding7[1];
bool errorInScript;
bool canBePaused;
BYTE zPadding8[3];
bool canRemoveBlipsCreatedByAnyScript;
BYTE zPadding9[7];
DWORD flags;
};
Functions
A list of Functions that occur in GTA IV's memory.
/* 0x4581C0 */ unsigned int __cdecl CRC32(char* text,unsigned int mask); // 1.0.2.0
Variables
A list of Variables that occur in GTA IV's memory.
/* 0xF56BC4 */ BYTE AESEncryptionKey[32]; // 1.0.2.0
/* 0x15AD8B4 */ DWORD* globalVariablesPool; // 1.0.2.0
External Links
- GTAForums: Documenting GTAIV memory addresses
- GTAForums: IV Limits