<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://gtamods.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=OrionSR</id>
	<title>GTAMods Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://gtamods.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=OrionSR"/>
	<link rel="alternate" type="text/html" href="https://gtamods.com/wiki/Special:Contributions/OrionSR"/>
	<updated>2026-04-17T16:31:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18154</id>
		<title>0874</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18154"/>
		<updated>2020-07-08T03:57:06Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OpCode&lt;br /&gt;
| games       = {{Icon|SA}}&lt;br /&gt;
| command     = SET_ZONE_POPULATION_RACE&lt;br /&gt;
| description = Bitflags that enable racial groups within the [[zone]]&lt;br /&gt;
| syntax1     = {{Icon|SA}} 0874: set_zone_population_race '[''string'']' to [''int1'']&lt;br /&gt;
| syntax2     = {{Icon|SA}} 0874: set_zone_ped_population_type '[''string'']' to [''int1'']&lt;br /&gt;
| syntax3     = {{Icon|SA}} 0874: set_zone 'CHC1A' popcycle_group_for_peds_to 9&lt;br /&gt;
| p1t         = '[''string'']'&lt;br /&gt;
| p1d         = [[GXT]] ID for the [[zone]]&lt;br /&gt;
| p2t         = [''int1'']&lt;br /&gt;
| p2d         = The sum of all enabled bitflags&lt;br /&gt;
| native      = [[SET_ZONE_POPULATION_RACE]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bitflags&lt;br /&gt;
  PedRace_Black = 1&lt;br /&gt;
  PedRace_White = 2&lt;br /&gt;
  PedRace_Asian = 4&lt;br /&gt;
  PedRace_Hispanic = 8&lt;br /&gt;
&lt;br /&gt;
A ped model's race is determined by the first letter of the ped ID.&lt;br /&gt;
  Black = B&lt;br /&gt;
  White = W&lt;br /&gt;
  Asian = O,I&lt;br /&gt;
  Hispanic = H&lt;br /&gt;
&lt;br /&gt;
In a zone with a PedRace setting of 0, only peds that are neither Black, White, Asian, nor Hispanic will spawn; like MALE01, SFYPRO, SMYST1, SMYST2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dealer ped streamer logic:&lt;br /&gt;
  1) current weather zone is 2 -&amp;gt; entry 3 from dealer ped group is selected (biker in SF)&lt;br /&gt;
  2) population race &amp;amp; 1 != 0 -&amp;gt; entry 0 is selected (black)&lt;br /&gt;
  3) population race &amp;amp; 2 != 0 -&amp;gt; entry 1 is selected (white)&lt;br /&gt;
  4) otherwise, entry 2 is selected (hispanic)&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18153</id>
		<title>0874</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18153"/>
		<updated>2020-07-08T03:41:18Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OpCode&lt;br /&gt;
| games       = {{Icon|SA}}&lt;br /&gt;
| command     = SET_ZONE_PED_POPULATION_TYPE&lt;br /&gt;
| description = Bitflags that enable racial groups within the [[zone]]&lt;br /&gt;
| syntax1     = {{Icon|SA}} 0874: set_zone_ped_population_race '[''string'']' to [''int1'']&lt;br /&gt;
| syntax2     = {{Icon|SA}} 0874: set_zone_ped_population_type '[''string'']' to [''int1'']&lt;br /&gt;
| syntax3     = {{Icon|SA}} 0874: set_zone 'CHC1A' popcycle_group_for_peds_to 9&lt;br /&gt;
| p1t         = '[''string'']'&lt;br /&gt;
| p1d         = [[GXT]] ID for the [[zone]]&lt;br /&gt;
| p2t         = [''int1'']&lt;br /&gt;
| p2d         = The sum of all enabled bitflags&lt;br /&gt;
| native      = [[SET_ZONE_POPULATION_RACE]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bitflags&lt;br /&gt;
  PedRace_Black = 1&lt;br /&gt;
  PedRace_White = 2&lt;br /&gt;
  PedRace_Asian = 4&lt;br /&gt;
  PedRace_Hispanic = 8&lt;br /&gt;
&lt;br /&gt;
A ped model's race is determined by the first letter of the ped ID.&lt;br /&gt;
  Black = B&lt;br /&gt;
  White = W&lt;br /&gt;
  Asian = O,I&lt;br /&gt;
  Hispanic = H&lt;br /&gt;
&lt;br /&gt;
In a zone with a PedRace setting of 0, only peds that are neither Black, White, Asian, nor Hispanic will spawn; like MALE01, SFYPRO, SMYST1, SMYST2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dealer ped streamer logic:&lt;br /&gt;
  1) current weather zone is 2 -&amp;gt; entry 3 from dealer ped group is selected (biker in SF)&lt;br /&gt;
  2) population race &amp;amp; 1 != 0 -&amp;gt; entry 0 is selected (black)&lt;br /&gt;
  3) population race &amp;amp; 2 != 0 -&amp;gt; entry 1 is selected (white)&lt;br /&gt;
  4) otherwise, entry 2 is selected (hispanic)&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18152</id>
		<title>0874</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=0874&amp;diff=18152"/>
		<updated>2020-07-08T03:38:57Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: Created page with &amp;quot;{{OpCode | games       = {{Icon|SA}} | command     = SET_ZONE_PED_POPULATION_TYPE | description = Bitflags that enable racial groups within the zone | syntax1     = {{Icon...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{OpCode&lt;br /&gt;
| games       = {{Icon|SA}}&lt;br /&gt;
| command     = SET_ZONE_PED_POPULATION_TYPE&lt;br /&gt;
| description = Bitflags that enable racial groups within the [[zone]]&lt;br /&gt;
| syntax1     = {{Icon|SA}} 0874: set_zone_ped_population_race '[''string'']' to [''int1'']&lt;br /&gt;
| syntax2     = {{Icon|SA}} 0874: set_zone_ped_population_type '[''string'']' to [''int1'']&lt;br /&gt;
| syntax3     = {{Icon|SA}} 0874: set_zone_ped_population_type 'CHC1A' to 9&lt;br /&gt;
| p1t         = '[''string'']'&lt;br /&gt;
| p1d         = [[GXT]] ID for the [[zone]]&lt;br /&gt;
| p2t         = [''int1'']&lt;br /&gt;
| p2d         = The sum of all enabled bitflags&lt;br /&gt;
| native      = [[SET_ZONE_POPULATION_RACE]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bitflags&lt;br /&gt;
  PedRace_Black = 1&lt;br /&gt;
  PedRace_White = 2&lt;br /&gt;
  PedRace_Asian = 4&lt;br /&gt;
  PedRace_Hispanic = 8&lt;br /&gt;
&lt;br /&gt;
A ped model's race is determined by the first letter of the ped ID.&lt;br /&gt;
  Black = B&lt;br /&gt;
  White = W&lt;br /&gt;
  Asian = O,I&lt;br /&gt;
  Hispanic = H&lt;br /&gt;
&lt;br /&gt;
In a zone with a PedRace setting of 0, only peds that are neither Black, White, Asian, nor Hispanic will spawn; like MALE01, SFYPRO, SMYST1, SMYST2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dealer ped streamer logic:&lt;br /&gt;
  1) current weather zone is 2 -&amp;gt; entry 3 from dealer ped group is selected (biker in SF)&lt;br /&gt;
  2) population race &amp;amp; 1 != 0 -&amp;gt; entry 0 is selected (black)&lt;br /&gt;
  3) population race &amp;amp; 2 != 0 -&amp;gt; entry 1 is selected (white)&lt;br /&gt;
  4) otherwise, entry 2 is selected (hispanic)&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14921</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14921"/>
		<updated>2015-09-16T09:45:52Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 25: ENEX Connections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for [[#Padding|padding]] and then ending with [[#Checksum|a checksum value]]. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Simple Vars====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||pad mode&lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||frame delta time&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||previous weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||current weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||forced weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||weather interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||weather type in list&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||float     ||amount of rain&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||Boolean: invert look (unused on PC)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||extra (interior) color ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||extra (interior) color toggle state&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||extra (interior) color interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||extra (interior) color weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||current water configuration (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||Boolean: unknown, related to riots (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||is french language set (does nothing)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german game (opcode [[040C]]; not affected by the language)&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-&lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from&lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img&lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     chance of initialization (in percents)&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      Boolean: is active&lt;br /&gt;
   0xC5  byte                      Boolean: 'if' statement result&lt;br /&gt;
   0xC6  byte                      Boolean: uses mission cleanup&lt;br /&gt;
   0xC7  byte                      Boolean: is external&lt;br /&gt;
   0xC8  byte                      Boolean: overrides text box&lt;br /&gt;
   0xC9  byte                      External script attach type&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      Boolean: 'if' check result&lt;br /&gt;
   0xD2  byte                      Boolean: 'not' flag&lt;br /&gt;
   0xD3  byte                      Boolean: is Wasted/Busted check active&lt;br /&gt;
   0xD4  byte                      Boolean: is Wasted/Busted&lt;br /&gt;
   0xD5  byte[3]                   (Align)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Boolean: is mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
&lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
&lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for Hands model&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE              DESCRIPTION&lt;br /&gt;
 0x0000  dword             Number of Garages&lt;br /&gt;
 0x0004  byte              Free Bombs&lt;br /&gt;
 0x0005  byte              Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte              Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword             Cars collected (unused III/VC leftover)&lt;br /&gt;
 0x000B  dword             Bank vans collected (unused III leftover)&lt;br /&gt;
 0x000F  dword             Police cars collected (unused III leftover)&lt;br /&gt;
 0x0013  dword[4]          Car types collected (unused VC leftover)&lt;br /&gt;
 0x0023  dword             Last time garage help message was displayed&lt;br /&gt;
 0x0027  StoredCar[20][4]  Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  SaveGarage[]      SaveGarage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (StoredCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  dword         Car Handling Flags&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 SaveGarage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit)&lt;br /&gt;
   offset 0x01&lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      collision proof&lt;br /&gt;
     0x10      melee proof&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Game Logic====&lt;br /&gt;
Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE               DESCRIPTION&lt;br /&gt;
 0x00    dword              Number of after death start points (unused by the game)&lt;br /&gt;
 0x04    byte               Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte               Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte               Game state (wasted/busted/on a rampage etc.)&lt;br /&gt;
 0x07    dword              Time of last event&lt;br /&gt;
 0x0B    AfterDeathStart[]  array of after death start points (unused) -- see details below&lt;br /&gt;
&lt;br /&gt;
 AfterDeathStart structure:&lt;br /&gt;
   0x00  float[3]           X, Y, Z&lt;br /&gt;
   0x0C  float              Angle&lt;br /&gt;
&lt;br /&gt;
====Block 5: Paths====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
&lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: Phone Info====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          Boolean: override restart&lt;br /&gt;
 0x01    float[3]      Override next restart coordinates (opcode [[016E]])&lt;br /&gt;
 0x0D    byte          Boolean: fade in after next death (always 1)&lt;br /&gt;
 0x0E    byte          Boolean: fade in after next arrest (always 1)&lt;br /&gt;
 0x0F    float[3]      Override next hospital restart coordinates (opcode [[08DF]])&lt;br /&gt;
 0x1B    float         Override next hospital restart radius{{Ref|8}}&lt;br /&gt;
 0x1F    float         Override next hospital restart heading&lt;br /&gt;
 0x23    float[3]      Override next police restart coordinates (opcode [[08E0]])&lt;br /&gt;
 0x2F    float         Override next police restart radius{{Ref|8}}&lt;br /&gt;
 0x33    float         Override next police restart heading&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|8}} Player has to die/be arrested within this radius in order for an override to happen.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end&lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name&lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gangs====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  CGangInfo[10]   CGangInfo structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 CGangInfo[]&lt;br /&gt;
   0x00  byte            gang ped model override (-1 to disable; unused)&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0;&lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: Ped Generators====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: Audio Script Object ====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player Info====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]])&lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       [[List_of_statistics_(SA)|float stats]] (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      [[List_of_statistics_(SA)|int stats]] (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]       num peds killed of the type [id]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   dword[14]       num times played radio station [id]&lt;br /&gt;
 0x0584   dword[100]      num mission attempts for mission [id]&lt;br /&gt;
 0x0714   byte[128]       has displayed stat message [id] (id as in statdisp.dat line number)&lt;br /&gt;
 0x0794                   end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Set Pieces====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones&lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel.&lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point.&lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B.&lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.&lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Relationships====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedRelationship[32]        PedRelationship structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedRelationship -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedRelationship[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedRelationship[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The relationship flags could be changed using opcode [[0746]] and similar.&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256, value of ID IPL limit&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang Wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        XYZ: players location during a &amp;quot;3rd Kill&amp;quot; (gang war trigger)&lt;br /&gt;
 0x24    dword           attack/war gang ID&lt;br /&gt;
 0x28    dword           war gang 2 ID&lt;br /&gt;
 0x2C    dword           gang strength (0 to 2, 3 is unused)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    float           next attack timer (counts down)&lt;br /&gt;
 0x3C    float[3]        XYZ: center of warzone&lt;br /&gt;
 0x48    dword           hood attack timeout (counts down)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           previous territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           current territories under control ([[08E2]])&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 disable door task     Disable &amp;quot;walk through door&amp;quot; task&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
&lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 no fadein             Don't fade in after teleport&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
&lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: 3D Markers====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||C3dMarker[5]||entrance markers [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+C3dMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status&lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://www.sweetscape.com/010editor/ 010 Editor], by {{U|Seemann}}: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.paulinternet.nl/sadoc - some documentation of the savegame file used by the savegame editor of Paul Breeuwsma&lt;br /&gt;
* {{GTAF|204807|Early documentation topic}}&lt;br /&gt;
* {{GTAF|348331|SA Save File Glitch Detection and Repair}} - a topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|406480|Save File Conversion: PS2 to PC}} - a topic by {{U|marshmallow1304}}&lt;br /&gt;
&lt;br /&gt;
{{Savegame-navi}}&lt;br /&gt;
{{SA-navi}}&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14920</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14920"/>
		<updated>2015-09-16T09:43:12Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: syncing enex flags with opcode descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for [[#Padding|padding]] and then ending with [[#Checksum|a checksum value]]. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Simple Vars====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||pad mode&lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||frame delta time&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||previous weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||current weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||forced weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||weather interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||weather type in list&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||float     ||amount of rain&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||Boolean: invert look (unused on PC)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||extra (interior) color ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||extra (interior) color toggle state&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||extra (interior) color interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||extra (interior) color weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||current water configuration (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||Boolean: unknown, related to riots (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||is french language set (does nothing)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german game (opcode [[040C]]; not affected by the language)&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-&lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from&lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img&lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     chance of initialization (in percents)&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      Boolean: is active&lt;br /&gt;
   0xC5  byte                      Boolean: 'if' statement result&lt;br /&gt;
   0xC6  byte                      Boolean: uses mission cleanup&lt;br /&gt;
   0xC7  byte                      Boolean: is external&lt;br /&gt;
   0xC8  byte                      Boolean: overrides text box&lt;br /&gt;
   0xC9  byte                      External script attach type&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      Boolean: 'if' check result&lt;br /&gt;
   0xD2  byte                      Boolean: 'not' flag&lt;br /&gt;
   0xD3  byte                      Boolean: is Wasted/Busted check active&lt;br /&gt;
   0xD4  byte                      Boolean: is Wasted/Busted&lt;br /&gt;
   0xD5  byte[3]                   (Align)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Boolean: is mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
&lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
&lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for Hands model&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE              DESCRIPTION&lt;br /&gt;
 0x0000  dword             Number of Garages&lt;br /&gt;
 0x0004  byte              Free Bombs&lt;br /&gt;
 0x0005  byte              Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte              Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword             Cars collected (unused III/VC leftover)&lt;br /&gt;
 0x000B  dword             Bank vans collected (unused III leftover)&lt;br /&gt;
 0x000F  dword             Police cars collected (unused III leftover)&lt;br /&gt;
 0x0013  dword[4]          Car types collected (unused VC leftover)&lt;br /&gt;
 0x0023  dword             Last time garage help message was displayed&lt;br /&gt;
 0x0027  StoredCar[20][4]  Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  SaveGarage[]      SaveGarage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (StoredCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  dword         Car Handling Flags&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 SaveGarage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit)&lt;br /&gt;
   offset 0x01&lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      collision proof&lt;br /&gt;
     0x10      melee proof&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Game Logic====&lt;br /&gt;
Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE               DESCRIPTION&lt;br /&gt;
 0x00    dword              Number of after death start points (unused by the game)&lt;br /&gt;
 0x04    byte               Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte               Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte               Game state (wasted/busted/on a rampage etc.)&lt;br /&gt;
 0x07    dword              Time of last event&lt;br /&gt;
 0x0B    AfterDeathStart[]  array of after death start points (unused) -- see details below&lt;br /&gt;
&lt;br /&gt;
 AfterDeathStart structure:&lt;br /&gt;
   0x00  float[3]           X, Y, Z&lt;br /&gt;
   0x0C  float              Angle&lt;br /&gt;
&lt;br /&gt;
====Block 5: Paths====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
&lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: Phone Info====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          Boolean: override restart&lt;br /&gt;
 0x01    float[3]      Override next restart coordinates (opcode [[016E]])&lt;br /&gt;
 0x0D    byte          Boolean: fade in after next death (always 1)&lt;br /&gt;
 0x0E    byte          Boolean: fade in after next arrest (always 1)&lt;br /&gt;
 0x0F    float[3]      Override next hospital restart coordinates (opcode [[08DF]])&lt;br /&gt;
 0x1B    float         Override next hospital restart radius{{Ref|8}}&lt;br /&gt;
 0x1F    float         Override next hospital restart heading&lt;br /&gt;
 0x23    float[3]      Override next police restart coordinates (opcode [[08E0]])&lt;br /&gt;
 0x2F    float         Override next police restart radius{{Ref|8}}&lt;br /&gt;
 0x33    float         Override next police restart heading&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|8}} Player has to die/be arrested within this radius in order for an override to happen.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end&lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name&lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gangs====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  CGangInfo[10]   CGangInfo structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 CGangInfo[]&lt;br /&gt;
   0x00  byte            gang ped model override (-1 to disable; unused)&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0;&lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: Ped Generators====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: Audio Script Object ====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player Info====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]])&lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       [[List_of_statistics_(SA)|float stats]] (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      [[List_of_statistics_(SA)|int stats]] (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]       num peds killed of the type [id]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   dword[14]       num times played radio station [id]&lt;br /&gt;
 0x0584   dword[100]      num mission attempts for mission [id]&lt;br /&gt;
 0x0714   byte[128]       has displayed stat message [id] (id as in statdisp.dat line number)&lt;br /&gt;
 0x0794                   end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Set Pieces====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones&lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel.&lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point.&lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B.&lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.&lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Relationships====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedRelationship[32]        PedRelationship structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedRelationship -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedRelationship[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedRelationship[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The relationship flags could be changed using opcode [[0746]] and similar.&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256, value of ID IPL limit&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang Wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        XYZ: players location during a &amp;quot;3rd Kill&amp;quot; (gang war trigger)&lt;br /&gt;
 0x24    dword           attack/war gang ID&lt;br /&gt;
 0x28    dword           war gang 2 ID&lt;br /&gt;
 0x2C    dword           gang strength (0 to 2, 3 is unused)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    float           next attack timer (counts down)&lt;br /&gt;
 0x3C    float[3]        XYZ: center of warzone&lt;br /&gt;
 0x48    dword           hood attack timeout (counts down)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           previous territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           current territories under control ([[08E2]])&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Disable &amp;quot;walk through door&amp;quot; task&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
&lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Don't fade in after teleport&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
&lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: 3D Markers====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||C3dMarker[5]||entrance markers [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+C3dMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status&lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://www.sweetscape.com/010editor/ 010 Editor], by {{U|Seemann}}: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.paulinternet.nl/sadoc - some documentation of the savegame file used by the savegame editor of Paul Breeuwsma&lt;br /&gt;
* {{GTAF|204807|Early documentation topic}}&lt;br /&gt;
* {{GTAF|348331|SA Save File Glitch Detection and Repair}} - a topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|406480|Save File Conversion: PS2 to PC}} - a topic by {{U|marshmallow1304}}&lt;br /&gt;
&lt;br /&gt;
{{Savegame-navi}}&lt;br /&gt;
{{SA-navi}}&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14185</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=14185"/>
		<updated>2015-06-11T16:50:13Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: Updated Car Flag immunities&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for [[#Padding|padding]] and then ending with [[#Checksum|a checksum value]]. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Simple Vars====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||pad mode&lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||frame delta time&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||previous weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||current weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||forced weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||weather interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||weather type in list&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||float     ||amount of rain&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||Boolean: invert look (unused on PC)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||extra (interior) color ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||extra (interior) color toggle state&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||extra (interior) color interpolation value&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||extra (interior) color weather ID&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||current water configuration (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||Boolean: unknown, related to riots (always 0)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||is french language set (does nothing)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german game (opcode [[040C]]; not affected by the language)&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-&lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from&lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img&lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     chance of initialization (in percents)&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      Boolean: is active&lt;br /&gt;
   0xC5  byte                      Boolean: 'if' statement result&lt;br /&gt;
   0xC6  byte                      Boolean: uses mission cleanup&lt;br /&gt;
   0xC7  byte                      Boolean: is external&lt;br /&gt;
   0xC8  byte                      Boolean: overrides text box&lt;br /&gt;
   0xC9  byte                      External script attach type&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      Boolean: 'if' check result&lt;br /&gt;
   0xD2  byte                      Boolean: 'not' flag&lt;br /&gt;
   0xD3  byte                      Boolean: is Wasted/Busted check active&lt;br /&gt;
   0xD4  byte                      Boolean: is Wasted/Busted&lt;br /&gt;
   0xD5  byte[3]                   (Align)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Boolean: is mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
&lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
&lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for Hands model&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE              DESCRIPTION&lt;br /&gt;
 0x0000  dword             Number of Garages&lt;br /&gt;
 0x0004  byte              Free Bombs&lt;br /&gt;
 0x0005  byte              Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte              Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword             Cars collected (unused III/VC leftover)&lt;br /&gt;
 0x000B  dword             Bank vans collected (unused III leftover)&lt;br /&gt;
 0x000F  dword             Police cars collected (unused III leftover)&lt;br /&gt;
 0x0013  dword[4]          Car types collected (unused VC leftover)&lt;br /&gt;
 0x0023  dword             Last time garage help message was displayed&lt;br /&gt;
 0x0027  StoredCar[20][4]  Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  SaveGarage[]      SaveGarage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (StoredCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  dword         Car Handling Flags&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 SaveGarage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit)&lt;br /&gt;
   offset 0x01&lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      collision proof&lt;br /&gt;
     0x10      melee proof&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Game Logic====&lt;br /&gt;
Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE               DESCRIPTION&lt;br /&gt;
 0x00    dword              Number of after death start points (unused by the game)&lt;br /&gt;
 0x04    byte               Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte               Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte               Game state (wasted/busted/on a rampage etc.)&lt;br /&gt;
 0x07    dword              Time of last event&lt;br /&gt;
 0x0B    AfterDeathStart[]  array of after death start points (unused) -- see details below&lt;br /&gt;
&lt;br /&gt;
 AfterDeathStart structure:&lt;br /&gt;
   0x00  float[3]           X, Y, Z&lt;br /&gt;
   0x0C  float              Angle&lt;br /&gt;
&lt;br /&gt;
====Block 5: Paths====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
&lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: Phone Info====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          Boolean: override restart&lt;br /&gt;
 0x01    float[3]      Override next restart coordinates (opcode [[016E]])&lt;br /&gt;
 0x0D    byte          Boolean: fade in after next death (always 1)&lt;br /&gt;
 0x0E    byte          Boolean: fade in after next arrest (always 1)&lt;br /&gt;
 0x0F    float[3]      Override next hospital restart coordinates (opcode [[08DF]])&lt;br /&gt;
 0x1B    float         Override next hospital restart radius{{Ref|8}}&lt;br /&gt;
 0x1F    float         Override next hospital restart heading&lt;br /&gt;
 0x23    float[3]      Override next police restart coordinates (opcode [[08E0]])&lt;br /&gt;
 0x2F    float         Override next police restart radius{{Ref|8}}&lt;br /&gt;
 0x33    float         Override next police restart heading&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|8}} Player has to die/be arrested within this radius in order for an override to happen.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end&lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name&lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gangs====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  CGangInfo[10]   CGangInfo structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 CGangInfo[]&lt;br /&gt;
   0x00  byte            gang ped model override (-1 to disable; unused)&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0;&lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: Ped Generators====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: Audio Script Object ====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player Info====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]])&lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       [[List_of_statistics_(SA)|float stats]] (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      [[List_of_statistics_(SA)|int stats]] (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]       num peds killed of the type [id]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   dword[14]       num times played radio station [id]&lt;br /&gt;
 0x0584   dword[100]      num mission attempts for mission [id]&lt;br /&gt;
 0x0714   byte[128]       has displayed stat message [id] (id as in statdisp.dat line number)&lt;br /&gt;
 0x0794                   end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police Trigger Zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones&lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel.&lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point.&lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B.&lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.&lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Relationships====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedRelationship[32]        PedRelationship structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedRelationship -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedRelationship[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedRelationship[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The relationship flags could be changed using opcode [[0746]] and similar.&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256, value of ID IPL limit&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang Wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        XYZ: players location during a &amp;quot;3rd Kill&amp;quot; (gang war trigger)&lt;br /&gt;
 0x24    dword           attack/war gang ID&lt;br /&gt;
 0x28    dword           war gang 2 ID&lt;br /&gt;
 0x2C    dword           gang strength (0 to 2, 3 is unused)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    float           next attack timer (counts down)&lt;br /&gt;
 0x3C    float[3]        XYZ: center of warzone&lt;br /&gt;
 0x48    dword           hood attack timeout (counts down)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           previous territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           current territories under control ([[08E2]])&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
&lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
&lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance Markers====&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers, can be created by opcode [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+CEntranceMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status&lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://www.sweetscape.com/010editor/ 010 Editor], by {{U|Seemann}}: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.paulinternet.nl/sadoc - some documentation of the savegame file used by the savegame editor of Paul Breeuwsma&lt;br /&gt;
* {{GTAF|204807|Early documentation topic}}&lt;br /&gt;
* {{GTAF|348331|SA Save File Glitch Detection and Repair}} - a topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|406480|Save File Conversion: PS2 to PC}} - a topic by {{U|marshmallow1304}}&lt;br /&gt;
&lt;br /&gt;
{{Savegame-navi}}&lt;br /&gt;
{{SA-navi}}&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=9799</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=9799"/>
		<updated>2011-04-30T10:42:07Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 23: Gang wars */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|{{Prettytable}} class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||weather ID &lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||original interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||interior color flag (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||changed interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german lang (?) (opcode [[040C]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-                    &lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for Hands model&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        XYZ: players location during a &amp;quot;3rd Kill&amp;quot; (gang war trigger)&lt;br /&gt;
 0x24    dword           attack/war gang ID&lt;br /&gt;
 0x28    dword           war gang 2 ID&lt;br /&gt;
 0x2C    dword           gang strength (0 to 2, 3 is unused)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    float           next attack timer (counts down)&lt;br /&gt;
 0x3C    float[3]        XYZ: center of warzone&lt;br /&gt;
 0x48    dword           hood attack timeout (counts down)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           previous territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           current territories under control ([[08E2]])&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers, can be created by opcode [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
|+CEntranceMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://www.sweetscape.com/010editor/ 010 Editor], by {{U|Seemann}}: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.paulinternet.nl/sadoc - some documentation of the savegame file used by the savegame editor of Paul Breeuwsma&lt;br /&gt;
* {{GTAF|204807|Early documentation topic}}&lt;br /&gt;
* {{GTAF|348331|SA Save File Glitch Detection and Repair}} - a topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|406480|Save File Conversion: PS2 to PC}} - a topic by {{U|marshmallow1304}}&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:Save Formats]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=9791</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=9791"/>
		<updated>2011-04-27T10:25:53Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 23: Gang wars */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TocRight}}&lt;br /&gt;
This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|{{Prettytable}} class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||weather ID &lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||original interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||interior color flag (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||changed interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german lang (?) (opcode [[040C]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-                    &lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for Hands model&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        XYZ: players location during a &amp;quot;3rd Kill&amp;quot; (gang war trigger)&lt;br /&gt;
 0x24    dword           attack/war gang ID&lt;br /&gt;
 0x28    dword           war gang 2 ID&lt;br /&gt;
 0x2C    dword           gang strength (0 to 2, 3 is unused)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    float           next attack timer (counts down)&lt;br /&gt;
 0x3C    float[3]        XYZ: center of warzone&lt;br /&gt;
 0x48    dword           hood attack timeout target (ms)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           previous territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           current territories under control ([[08E2]])&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers, can be created by opcode [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
|+CEntranceMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://www.sweetscape.com/010editor/ 010 Editor], by {{U|Seemann}}: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v3.0 by Paul Breeuwsma: http://www.paulinternet.nl/sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* http://www.paulinternet.nl/sadoc - some documentation of the savegame file used by the savegame editor of Paul Breeuwsma&lt;br /&gt;
* {{GTAF|204807|Early documentation topic}}&lt;br /&gt;
* {{GTAF|348331|SA Save File Glitch Detection and Repair}} - a topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|406480|Save File Conversion: PS2 to PC}} - a topic by {{U|marshmallow1304}}&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:Save Formats]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=7707</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=7707"/>
		<updated>2010-02-09T06:23:51Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 2: Players &amp;amp; Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article deals with the format of a '''save game file''' for [[GTA San Andreas]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTA SA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows 98'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows XP'' Example&lt;br /&gt;
* &amp;lt;code&amp;gt;C:\Users\Fred\Documents\GTA San Andreas User Files&amp;lt;/code&amp;gt; &amp;amp;ndash; ''Windows Vista'' Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
{|{{Prettytable}} class=&amp;quot;sortable&amp;quot;&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x0000  ||dword    ||version ID (checksum of a string describing the time of compilation){{Ref|1}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0004  ||char[100]||save name (long names are truncated on the save/load screen){{Ref|2}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0068  ||byte     ||current [[Mission_Pack|mission pack]]&lt;br /&gt;
|-&lt;br /&gt;
|0x0069  ||byte[3]  ||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x006C  ||dword    ||current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
|-&lt;br /&gt;
|0x0070  ||float[3] ||camera coordinates (x,y,z)&lt;br /&gt;
|-&lt;br /&gt;
|0x007C  ||dword    ||length (ms) of in-game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0080  ||dword    ||weather timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0084  ||byte     ||current in-game month&lt;br /&gt;
|-&lt;br /&gt;
|0x0085  ||byte     ||current in-game month day&lt;br /&gt;
|-&lt;br /&gt;
|0x0086  ||byte     ||game hour&lt;br /&gt;
|-&lt;br /&gt;
|0x0087  ||byte     ||game minute&lt;br /&gt;
|-&lt;br /&gt;
|0x0088  ||byte     ||weekday&lt;br /&gt;
|-&lt;br /&gt;
|0x0089  ||byte     ||current in-game month (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008A  ||byte     ||current in-game month day (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008B  ||byte     ||game hour (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008C  ||byte     ||game minute (copy)&lt;br /&gt;
|-&lt;br /&gt;
|0x008D  ||byte     ||Boolean: time copy flag{{Ref|3}}&lt;br /&gt;
|-&lt;br /&gt;
|0x008E  ||word     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x0090  ||byte     ||Boolean: has ever cheated flag&lt;br /&gt;
|-&lt;br /&gt;
|0x0091  ||byte[3]||(Align)&lt;br /&gt;
|-&lt;br /&gt;
|0x0094  ||dword    ||global timer&lt;br /&gt;
|-&lt;br /&gt;
|0x0098  ||float    ||game speed&lt;br /&gt;
|-&lt;br /&gt;
|0x009C  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A0  ||float    ||tick time (time of an iteration of the major game loop)&lt;br /&gt;
|-&lt;br /&gt;
|0x00A4  ||dword    ||number of the frames processed from the beginning of the game&lt;br /&gt;
|-&lt;br /&gt;
|0x00A8  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AA  ||word      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00AC  ||word     ||weather ID &lt;br /&gt;
|-&lt;br /&gt;
|0x00B0  ||dword     ||(unknown) &lt;br /&gt;
|-&lt;br /&gt;
|0x00B4  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00B8  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00BC  ||dword    ||vehicle camera view (opcode [[09AD]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00C0  ||dword    ||onfoot camera view&lt;br /&gt;
|-&lt;br /&gt;
|0x00C4  ||dword    ||current interior&lt;br /&gt;
|-&lt;br /&gt;
|0x00C8  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00CC  ||dword    ||original interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D0  ||byte     ||interior color flag (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D4  ||float     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00D8  ||dword    ||changed interior color (?)&lt;br /&gt;
|-&lt;br /&gt;
|0x00DC  ||dword     ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E0  ||byte     ||Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E1  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00E4  ||dword    ||max wanted level (opcode [[01F0]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00E8  ||dword    ||max chaos{{Ref|4}}&lt;br /&gt;
|-&lt;br /&gt;
|0x00EC  ||byte      ||(unknown)&lt;br /&gt;
|-&lt;br /&gt;
|0x00ED  ||byte     ||is german lang (?) (opcode [[040C]])&lt;br /&gt;
|-&lt;br /&gt;
|0x00EE  ||byte     ||censore flag{{Ref|5}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011C  ||byte     ||times left to display a cinematic camera help{{Ref|6}}&lt;br /&gt;
|-&lt;br /&gt;
|0x011E  ||word      ||&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
|-&lt;br /&gt;
|0x0120  ||word     ||SYSTEMTIME wMonth&lt;br /&gt;
|-                    &lt;br /&gt;
|0x0122  ||word     ||SYSTEMTIME wDayOfWeek&lt;br /&gt;
|-&lt;br /&gt;
|0x0124  ||word     ||SYSTEMTIME wDay&lt;br /&gt;
|-&lt;br /&gt;
|0x0126  ||word     ||SYSTEMTIME wHour&lt;br /&gt;
|-&lt;br /&gt;
|0x0128  ||word     ||SYSTEMTIME wMinute&lt;br /&gt;
|-&lt;br /&gt;
|0x012A  ||word     ||SYSTEMTIME wSecond&lt;br /&gt;
|-&lt;br /&gt;
|0x012C  ||word     ||SYSTEMTIME wMilliseconds&lt;br /&gt;
|-&lt;br /&gt;
|0x0130  ||dword    ||Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
|-&lt;br /&gt;
|0x0134  ||byte     ||Boolean: the vehicle stealing help was shown{{Ref|7}}&lt;br /&gt;
|-&lt;br /&gt;
|0x0135  ||byte     ||Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0136  ||byte     ||Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
|-&lt;br /&gt;
|0x0137  ||byte      ||(Align)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Notes:&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|1}} Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|2}} While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|3}} Time copy flag shows whether the time data was saved using opcode [[0253]].&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|4}} Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|5}} When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|6}} This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&amp;lt;br&amp;gt;&lt;br /&gt;
{{Note|7}} This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[mission script]]s in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00   dword        Number of Players&lt;br /&gt;
 0x04   Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00   dword        Number of Objects&lt;br /&gt;
 0x04   Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      [[Ped type]]&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
* The CRC32 is calculated of the uppercase filename without extension. After calculation the bits are inverted. The files/filenames can be found in data/shopping.dat and by extracting models/player.img. For example, for White Tank the value is 0xffffffff-crc32(&amp;quot;VEST&amp;quot;) = 0xbb1ca4cc for both model and texture.&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station [see below]&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
 Radio Stations&lt;br /&gt;
     0x00      vehicle has no radio&lt;br /&gt;
     0x01      playback fm&lt;br /&gt;
     0x02      k rose&lt;br /&gt;
     0x03      k-dst&lt;br /&gt;
     0x04      bounce fm&lt;br /&gt;
     0x05      sf-ur&lt;br /&gt;
     0x06      radio los santos&lt;br /&gt;
     0x07      radio x&lt;br /&gt;
     0x08      csr 103.9&lt;br /&gt;
     0x09      k-jah west&lt;br /&gt;
     0x0a      master sounds 98.3&lt;br /&gt;
     0x0b      wctr&lt;br /&gt;
     0x0c      user track player&lt;br /&gt;
     0x0d      radio off&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          timer&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             [[Binary IPL|IPL stream]] of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of [[JUMP|Unique Stunt Jumps]] (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers, can be created by opcode [[0A40]]&lt;br /&gt;
|-&lt;br /&gt;
|0x8C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|{{Prettytable}}&lt;br /&gt;
|+CEntranceMarker struct&lt;br /&gt;
!OFFSET&lt;br /&gt;
!TYPE&lt;br /&gt;
!DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B&lt;br /&gt;
|-&lt;br /&gt;
|0x1C||end||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Savegame Editor documentation==&lt;br /&gt;
The source code and documentation of the Savegame Editor of Paul Breeuwsma is put online.&lt;br /&gt;
You can [http://www.paulinternet.nl/#sa download it] or [http://www.paulinternet.nl/sadoc/ view the documentation online].&lt;br /&gt;
Feel free to use/copy/edit it if you want to.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://en.wikipedia.org/wiki/010_Editor 010 Editor], by [[User:Seemann|Seemann]]: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v2.8 by Paul Breeuwsma: http://www.paulinternet.nl/#sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
* GTA:SA Save Game Tool v1.0 http://home.comcast.net/~shamblertm/pages/gtasa_sgt.html&lt;br /&gt;
&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
[[Category:Save Formats]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Item_Placement&amp;diff=6881</id>
		<title>Item Placement</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Item_Placement&amp;diff=6881"/>
		<updated>2009-08-06T21:58:55Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: Door type info was removed from linked page. Updated with new link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Cleanup-rewrite}}&lt;br /&gt;
&lt;br /&gt;
'''Item placement''' files, known by the extension '''.ipl''', are map files used to place objects into the GTA world, as well as define zones, paths, garages, interior portals, and a lot more. Most IPL files can easily be opened and edited using any text-editing program like [[Wikipedia:Notepad|Notepad]]. In San Andreas there are also [[Binary_IPL|binary IPL]] files which are located in the [[IMG|IMG archives]] of the game. Those you can only open using a special [[Item_Placement#Useful_Tools|editor]].&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The &amp;lt;code&amp;gt;.ipl&amp;lt;/code&amp;gt; files are split up into many sections. Not all of them have to be used, leaving them empty works as well. Each section starts with a section identifier and ends with the keyword &amp;quot;end&amp;quot;, both in a separate line.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 inst&lt;br /&gt;
 ...&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===INST===&lt;br /&gt;
Locations and properties for instances of static and [[Dynamic_Object|dynamic map objects]].&lt;br /&gt;
&lt;br /&gt;
''GTA3 format''&lt;br /&gt;
 id, name, x, y, z, sx, sy, sz, rx, ry, rz, rw&lt;br /&gt;
&lt;br /&gt;
''Vice City format''&lt;br /&gt;
 id, name, int, x, y, z, sx, sy, sz, rx, ry, rz, rw&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 id, name, int, x, y, z, rx, ry, rz, rw, lod&lt;br /&gt;
&lt;br /&gt;
;ID: Unique object identifier. Must match in [[IDE]] file identifier. (integer)&lt;br /&gt;
;Name: Usually same as the &amp;lt;code&amp;gt;.dff&amp;lt;/code&amp;gt; [[model file]], without extension. (string)&lt;br /&gt;
;int: [[Interior#List|Interior number]]; zero for outside. (integer)&lt;br /&gt;
;x, y, z: Item placement coordinates. (floating point numbers)&lt;br /&gt;
;sx, sy, sz: Item scale, scales visible model only, doesn't scale the [[collision model]]. (floating point numbers)&lt;br /&gt;
;rx, ry, rz, rw: Item rotations.  Defined as [[Wikipedia:quaternion|quaternion]], quite sophisticated math is needed to translate it to [[Wikipedia:Euler angles|Euler angles]]. A map editing program should be used to edit these.&lt;br /&gt;
;lod: San Andreas only.  This is the line number in the current IPL file for the [[LOD]] which belongs to this object.  The first item in IPL file is line number 0, second is number 1 and so on.  A value of -1 means no LOD is used. (integer)&lt;br /&gt;
&lt;br /&gt;
===CULL===&lt;br /&gt;
This creates rainfree zones, wastefree zones, map reflections, TV screens, and temporary fixed camera positions.&lt;br /&gt;
&lt;br /&gt;
''GTA3 and Vice City format''&lt;br /&gt;
 x1, y1, z1, x2, y2, z2, x3, y3, z3, flag, 0&lt;br /&gt;
;x2, y2, z2: lower-left corner of the areabox&lt;br /&gt;
;x3, y3, z3: upper-right corner of the areabox&lt;br /&gt;
''San Andreas format 1''&lt;br /&gt;
 centerX, centerY, centerZ, 0 (some kind of rotation), Ywidth, bottomZ, Xwidth, 0 (some kind of rotation), topZ, Flag, Flag 2&lt;br /&gt;
''San Andreas format 2''&lt;br /&gt;
 centerX, centerY, centerZ, 0 (some kind of rotation), Ywidth, bottomZ, Xwidth, 0 (some kind of rotation), topZ, Flag, Vx, Vy, Vz, Cm&lt;br /&gt;
Cull zone boundaries in San Andreas are aligned to the nearest world unit.&amp;lt;br&amp;gt;&lt;br /&gt;
Flags:&amp;lt;br&amp;gt;&lt;br /&gt;
1 Camera close in into player using closest third-person view camera mode, does not close in if in first person or cinematic mode, camera mode cannot be changed while in the zone&amp;lt;br&amp;gt;&lt;br /&gt;
2 camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone&amp;lt;br&amp;gt;&lt;br /&gt;
4 Unknown&amp;lt;br&amp;gt;&lt;br /&gt;
8 Rain-free, police helicopter-free zone&amp;lt;br&amp;gt;&lt;br /&gt;
4096 5-star military zone&lt;br /&gt;
&lt;br /&gt;
===PATH===&lt;br /&gt;
''Vice City only''&lt;br /&gt;
&lt;br /&gt;
'''Ped, Car and Boat Paths''', defines paths relative to the world centre. Only used in GTA VC, this format is much easier than in GTA3 where the paths were stored in IDE files, and GTA-SA paths which are stored in **nodes.dat inside gta3.img.  This is a quite complicated format and hardly usable without an editing program (such as [[Ked]]).&lt;br /&gt;
&lt;br /&gt;
GTA SA uses [[GTA SA Paths|compiled binary files]] for its paths.&lt;br /&gt;
&lt;br /&gt;
===GRGE===&lt;br /&gt;
This creates [[Garage|garages]] for the &amp;lt;code&amp;gt;[[main.scm]]&amp;lt;/code&amp;gt; to use. Only used in San Andreas.&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 X1, Y1, Z1, frontX, frontY, X2, Y2, Z2, Door, Type, Name&lt;br /&gt;
;X1, Y1, Z1: Lower left front&lt;br /&gt;
;frontX, frontY: Lower right front&lt;br /&gt;
;X2, Y2, Z2: Upper left rear&lt;br /&gt;
;Door: [[Grge#Types_of_doors|Types of doors]]&lt;br /&gt;
;Type: [[Garage#San_Andreas|Type of garage]]&lt;br /&gt;
;Name: [[Garage#San_Andreas_2|Used to edit garage through the SCM]]&lt;br /&gt;
&lt;br /&gt;
===ENEX===&lt;br /&gt;
This creates entrances to exits or [[interior]] connections to real world by placing yellow markers on the map for CJ to walk through. Note that changes to the flags and links of existing markers are not updated by the text files after the save is created so maintaining the proper sequence of enex lines is a primary concern. New connections can be added to an existing save if temporary (burglary) connections are not present in the save data. Indoor saves generally have no temporary enex data. Add the markers at the very end of the &amp;lt;code&amp;gt;[[gta.dat]]&amp;lt;/code&amp;gt; else it can negatively affect currently placed markers. 376 of 400 possible enex connections are used in a standard game.&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 X1, Y1, Z1, ROT, W1, W2, C8, X2, Y2, Z2, Rot2, Int, Flag, Name, Sky, I2, Time On, Time Off&lt;br /&gt;
;X1, Y1, Z1: entrance location &lt;br /&gt;
;ROT: ???&lt;br /&gt;
;W1: X width of entry&lt;br /&gt;
;W2: Y width of entry&lt;br /&gt;
;C8: constant 8&lt;br /&gt;
;X2, Y2, Z2: exit location &lt;br /&gt;
;Rot2: exit rotation in degrees&lt;br /&gt;
;Int: The target interior number&lt;br /&gt;
;Flag: The type of marker&lt;br /&gt;
;Name: [[Interior#San_Andreas_2|Interior name]], used to find the counterpart and to identify via mission script&lt;br /&gt;
;Sky: Sky color changer&lt;br /&gt;
;I2: unknown integer flags, could be weather related&lt;br /&gt;
;Time On: enables the marker at this time&lt;br /&gt;
;Time Off: disables the marker at this time&lt;br /&gt;
&lt;br /&gt;
====San Andreas Enex Flags====&lt;br /&gt;
{|&lt;br /&gt;
! Flag&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| unknown interior&lt;br /&gt;
| Only used for interior markers&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| unknown pairing&lt;br /&gt;
| Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Create linked pair&lt;br /&gt;
| Pair with unflagged mate during new game start&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Reward interior&lt;br /&gt;
| Sets flag 0010 on pair mate when used&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Used reward entrance&lt;br /&gt;
| Set by accessing reward interior&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Cars and aircraft&lt;br /&gt;
| Enable for cars and aircraft&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| Bikes and motorcycles&lt;br /&gt;
| Enable for bikes and motorcycles&lt;br /&gt;
|-&lt;br /&gt;
| 128&lt;br /&gt;
| Disable on foot&lt;br /&gt;
| No foot traffic. Use for cars and/or bikes only&lt;br /&gt;
|-&lt;br /&gt;
| 256&lt;br /&gt;
| Accept NPC group&lt;br /&gt;
| Group members accepted at destination of pair (passengers stripped)&lt;br /&gt;
|-&lt;br /&gt;
| 512&lt;br /&gt;
| Food date flag&lt;br /&gt;
| Set and cleared by food date (cut-scene related)&lt;br /&gt;
|-&lt;br /&gt;
| 1024&lt;br /&gt;
| unknown burglary&lt;br /&gt;
| Set on Bayside and Temporary Burglary doors&lt;br /&gt;
|-&lt;br /&gt;
| 2048&lt;br /&gt;
| Disable exit&lt;br /&gt;
| Player can enter but cannot exit a two-way pair&lt;br /&gt;
|-&lt;br /&gt;
| 4096&lt;br /&gt;
| Burglary access&lt;br /&gt;
| Enabled and disabled during Burglary&lt;br /&gt;
|-&lt;br /&gt;
| 8192&lt;br /&gt;
| Entered without exit&lt;br /&gt;
| Set by Entrance, Cleared by Exit; Applies to one side of a two&lt;br /&gt;
|-&lt;br /&gt;
| 16384&lt;br /&gt;
| Enable access&lt;br /&gt;
| Enabled by default; often cleared by scripts&lt;br /&gt;
|-&lt;br /&gt;
| 32768&lt;br /&gt;
| Delete enex&lt;br /&gt;
| Enex is deleted when used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====San Andreas Enex Sky Colors====&lt;br /&gt;
{|&lt;br /&gt;
! Sky Color&lt;br /&gt;
! Descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| blue sky&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| white fading to black&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Black with yellow lights.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| same as 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| same as 2&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| white fading to purple fading to black with yellow lights&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| white fading to black with yellow lights.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| white fading to green fading to black with yellow light (probably clouds)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| same as 2&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Purple (gay) retarded shadows not much sight.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| same as 7 only green is ocean blue&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| same as 2.....&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Nightly Mist&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| Blue fading yellow (sunrise i think)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Blue air with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| darker blue air with lightblue clouds&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Darker Blue air with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Orange with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Orange fading gray with orange clouds (weird)&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| this is red fading PURPLE with no seeing rang that you can't even see yourself&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| Dark Purple to grey with nice sun reflection&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| same as 19&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| the best one: big sun white clouds and blue air&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Blue air white clouds HUGE SUN&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Orange with dark orange clouds&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===PICK===&lt;br /&gt;
This creates permanent [[weapon]] pickups. Rockstar only used this to create fire extinguisher pickups at fast food restaurants.&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 Weapon ID, X, Y, Z&lt;br /&gt;
&lt;br /&gt;
====San Andreas Pick Weapon IDs====&lt;br /&gt;
{|&lt;br /&gt;
! ID&lt;br /&gt;
! Weapon Name&lt;br /&gt;
! Ammo&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Brass Knuckles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Nightstick&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Knife&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Golf Club&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Bat&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Shovel&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Pool Cue&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Katana&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Chainsaw&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Molotov&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Grenades&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Satchels&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 9mm Pistol&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Silenced 9mm&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Desert Eagle&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Shotgun&lt;br /&gt;
| 15&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| SPAS Shotgun&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Tec 9&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Micro SMG&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| MP5&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| AK47&lt;br /&gt;
| 80&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| M4&lt;br /&gt;
| 80&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Country Rifle&lt;br /&gt;
| 20&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Sniper Rifle&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Flamethrower&lt;br /&gt;
| 100&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Minigun&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| Large Purple Dildo&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Small White Dildo&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 35&lt;br /&gt;
| Large White Vibrator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Small Black Vibrator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Flowers&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| Cane&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Ringbox&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 40&lt;br /&gt;
| Necklace Box&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| Cellphone&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 43&lt;br /&gt;
| Teargas&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| Minigun (Duplicate)&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 45&lt;br /&gt;
| SPAS Shotgun (Duplicate)&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 46&lt;br /&gt;
| Rocket Launcher&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| 47&lt;br /&gt;
| Heat Seeking Rocket Launcher&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| Detonator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 49&lt;br /&gt;
| Spray can&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| Fire Extinguisher&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 51&lt;br /&gt;
| Camera&lt;br /&gt;
| 36&lt;br /&gt;
|-&lt;br /&gt;
| 52&lt;br /&gt;
| Nightvision Goggles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| Infrared Goggles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Jetpack&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| Parachute&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===JUMP===&lt;br /&gt;
Creates a Unique Stunt Jump based on the minimum and maximum coordinates for the starting and landing zones. This format conforms with the encoding provided by opcode [[0814]].&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 startXmin, startYmin, startZmin, startXmax, startYmax, startZmax, landXmin, landYmin, landZmin, &lt;br /&gt;
 landXmax, landYmax, landZmax, camX, camY, camZ, reward&lt;br /&gt;
&lt;br /&gt;
===TCYC===&lt;br /&gt;
Creates black sky if you enter the zone. Also exists for all towns in countryside. Probably custom weather?&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 X1, Y1, Z1, X2, Y2, Z2, ?, ?, ?, ?, ?&lt;br /&gt;
&lt;br /&gt;
===AUZO===&lt;br /&gt;
This creates an audio if you enter the zone.&lt;br /&gt;
&lt;br /&gt;
''San Andreas format type 1''&lt;br /&gt;
 Name, ID, Switch, X1, Y1, Z1, X2, Y2, Z2&lt;br /&gt;
;Name: Name of the zone&lt;br /&gt;
;ID: Sound played in this zone&lt;br /&gt;
;Switch: Makes it always on or always off. Can be forced using the main.scm using opcode [[0917]]&lt;br /&gt;
&lt;br /&gt;
''San Andreas format type 2''&lt;br /&gt;
 Name, ID, Switch, X, Y, Z, Volume&lt;br /&gt;
;Name: Name of the zone&lt;br /&gt;
;ID: Sound played in this zone&lt;br /&gt;
;Switch: Makes it always on or always off. Can be forced using the main.scm using opcode [[0917]]&lt;br /&gt;
;Volume: The distance the sound will be heard&lt;br /&gt;
&lt;br /&gt;
====San Andreas Auzo Audio IDs====&lt;br /&gt;
{|&lt;br /&gt;
! ID&lt;br /&gt;
! What sound it plays&lt;br /&gt;
! Description of sound in the unmodified audio streams&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Ambience track 9&lt;br /&gt;
| St Mark's violin music&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Ambience track 6&lt;br /&gt;
| Beach party bkgd song&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Ambience track 31&lt;br /&gt;
| Unused loud hum&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Ambience track 5&lt;br /&gt;
| Awards ceremony music&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Ambience track 34&lt;br /&gt;
| Loud hum heard on ships&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Ambience track 23&lt;br /&gt;
| Low Rider Challenge bkgd song&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Ambience track 30&lt;br /&gt;
| Static sound heard on military bases&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Ambience track 12&lt;br /&gt;
| Casino bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Ambience track 4&lt;br /&gt;
| Quiet hum heard in Area 69&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Ambience track 2&lt;br /&gt;
| Fan-like clicking heard in Abattoir&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Ambience track 1&lt;br /&gt;
| Quiet hum heard in 24-7s&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Ambience track 14&lt;br /&gt;
| Loud hum heard in Dam interior&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Ambience track 25&lt;br /&gt;
| Racing sounds heard in ITB lobby&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| Ambience track 24&lt;br /&gt;
| Quiet hum heard in Planning Dept&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Ambience track 20&lt;br /&gt;
| Quiet hum heard in safe houses&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Ambience track 13&lt;br /&gt;
| Dance Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Ambience track 13&lt;br /&gt;
| Dance Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Favorite Radio Station&lt;br /&gt;
| Stream or User Tracks Player&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Ambience track 28&lt;br /&gt;
| Pleasure Domes bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Ambience track 21&lt;br /&gt;
| Loud hum heard in Jet interior&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Ambience track 10&lt;br /&gt;
| Muzak-type bkgd heard in unused diner interiors&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Ambience track 29&lt;br /&gt;
| Quiet hum heard in police stations&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| Ambience track 35&lt;br /&gt;
| Stadium event bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| Ambience track 18&lt;br /&gt;
| Fast Food Joint bkgd sounds&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| Ambience track 3&lt;br /&gt;
| Ammunation PA loop&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| Ambience track 39&lt;br /&gt;
| Quiet hum heard in warehouses&lt;br /&gt;
|-&lt;br /&gt;
| 51&lt;br /&gt;
| Ambience track 22&lt;br /&gt;
| Very loud hum heard in cargo plane?&lt;br /&gt;
|-&lt;br /&gt;
| 52&lt;br /&gt;
| Radio stream CH&lt;br /&gt;
| Playback FM&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| Radio stream CO&lt;br /&gt;
| K-ROSE&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Radio stream CR&lt;br /&gt;
| KDST&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| Radio stream DS&lt;br /&gt;
| Bounce FM&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| Radio stream HC&lt;br /&gt;
| SFUR&lt;br /&gt;
|-&lt;br /&gt;
| 57&lt;br /&gt;
| Radio stream MH&lt;br /&gt;
| Radio Los Santos&lt;br /&gt;
|-&lt;br /&gt;
| 58&lt;br /&gt;
| Radio stream MR&lt;br /&gt;
| Radio X&lt;br /&gt;
|-&lt;br /&gt;
| 59&lt;br /&gt;
| Radio stream NJ&lt;br /&gt;
| CSR&lt;br /&gt;
|-&lt;br /&gt;
| 60&lt;br /&gt;
| Radio stream RE&lt;br /&gt;
| K-JAH West&lt;br /&gt;
|-&lt;br /&gt;
| 61&lt;br /&gt;
| Radio stream RG&lt;br /&gt;
| MasterSounds&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| Radio stream TK&lt;br /&gt;
| WCTR&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| Ambience track 17&lt;br /&gt;
| Unused quiet hum&lt;br /&gt;
|-&lt;br /&gt;
| 66&lt;br /&gt;
| Ambience track 36&lt;br /&gt;
| Strip Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 67&lt;br /&gt;
| Ambience track 37&lt;br /&gt;
| Unused bkgd medley&lt;br /&gt;
|}&lt;br /&gt;
Notes: Any ID value from 0-70 inclusive not listed above generated no background sound.&amp;lt;br&amp;gt;&lt;br /&gt;
Audio 4 type two only&amp;lt;br&amp;gt;&lt;br /&gt;
Audios 5, 10, 12, and 13 disabled by default, can be re-enabled&lt;br /&gt;
&lt;br /&gt;
===MULT===&lt;br /&gt;
''San Andreas and GTA4 only''&lt;br /&gt;
&lt;br /&gt;
In San Andreas, this was never used in the game. This section is currently unknown and may never be known; it is ignored by the game.&lt;br /&gt;
&lt;br /&gt;
===CARS===&lt;br /&gt;
Only used in San Andreas, this creates permanent parked vehicles around the state. This section is similar to the opcode [[014B]], the only difference to the opcode is that an IPL-Spawned car got an check if another car is already parked in an specific radius at this position. Rockstar used it only in [[Binary_IPL|binary IPL]]s but it can also be used in regular IPLs.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''San Andreas format''&lt;br /&gt;
 X, Y, Z, angle, car id, primary color, secondary color, force_spawn, &lt;br /&gt;
 alarm_probability, door_lock_probability, unknown (word), unknown (word)&lt;br /&gt;
&lt;br /&gt;
Angle is in radian units: degrees/~57.2958&amp;lt;br&amp;gt;&lt;br /&gt;
Car ID can be random: -1&amp;lt;br&amp;gt;&lt;br /&gt;
Vehicles spawn more reliably if force_spawn is true: 1&lt;br /&gt;
&lt;br /&gt;
===OCCL===&lt;br /&gt;
This creates [[occlusion]] boxes around Vice City and San Andreas.&lt;br /&gt;
&lt;br /&gt;
''Vice City and San Andreas format''&lt;br /&gt;
 direct mid x, direct mid y, bottom height z, width x, width y, height from bottom height to top, &lt;br /&gt;
 rotation&lt;br /&gt;
&lt;br /&gt;
===ZONE===&lt;br /&gt;
Although technically an IPL section, this is usually only used in [[zone]] files (extension &amp;lt;code&amp;gt;.zon&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===BLOK===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===VNOD===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===LINK===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===MLO+===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===RTFX===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===LODM===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===SLOW===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
===2DFX===&lt;br /&gt;
''GTA4 only''&lt;br /&gt;
&lt;br /&gt;
==Useful Tools==&lt;br /&gt;
* {{GTAF|315944|IPL Helper}} - by {{U|Xmen}}&lt;br /&gt;
* [http://www.gta.ocram-net.de/index_all.php?downloadsa=11 Binary (De-)Compiler] - By {{U|ocram88}}&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* {{GTAF|118193|GTA3/VC Map File Documentation and Troubleshooting}} - Topic by {{U|Opius}} covering general features of IPL files in GTA3 and GTA VC.&lt;br /&gt;
* {{GTAF|93990|Paths Documentation for SA, VC and GTA3}} - Topic by {{U|REspawn}} detailing Vice City's paths&lt;br /&gt;
* {{GTAF|202532|GTA SA IPL Documentation}} - Topic by {{U|spaceeinstein}} covering details of the IPL format in GTA SA.&lt;br /&gt;
* {{GTAF|331835|Enex Documentation}} - Topic by {{U|OrionSR}}&lt;br /&gt;
* {{GTAF|post|188549|3177288|Explanation of GTA SA LOD System}} - Post by {{U|steve-m}} explaining the [[LOD]] system for IPL files in GTA SA.&lt;br /&gt;
* [http://projectcerbera.com/gta/vc/tutorials/paths Explanation of the path-section in a VC IPL] - by {{U|Cerbera}}&lt;br /&gt;
&lt;br /&gt;
{{GTA4-navi}}&lt;br /&gt;
{{SA-navi}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Map Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=3574</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=3574"/>
		<updated>2008-10-02T11:54:41Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 22: Shopping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      censore flag (see note 5 below)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 6 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 7 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# When the censore flag is set to 0, some actions are disabled in the game, such as money drop from the killed people, no more headshots, etc. This flag is controlled by what language you are using. If it's English, this flag is set to 1.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00    dword        Number of Players&lt;br /&gt;
 0x04    Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00    dword        Number of Objects&lt;br /&gt;
 0x04    Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          unknown (timer?)&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; see details below&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
# Map Fog Array: Each byte denotes the state of the certain map sector (00 = not visited / 01 = visited); byte order = N to S (10 rows), then E to W (10 cols).&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             IPL stream of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
Each byte represents the shopping items listed in the order of &amp;quot;section prices&amp;quot; at the beginning of shopping.dat. A short summary of the 544 flags is: CarMods, Clothes (torso, legs, shoes, necklace, watch, glasses, hats), Haircuts, Tattoos, Food, and Weapons.&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Savegame Editor documentation==&lt;br /&gt;
The source code and documentation of the Savegame Editor of Paul Breeuwsma is put online.&lt;br /&gt;
You can [http://www.paulinternet.nl/#sa download it] or [http://www.paulinternet.nl/sadoc/ view the documentation online].&lt;br /&gt;
Feel free to use/copy/edit it if you want to.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://en.wikipedia.org/wiki/010_Editor 010 Editor], by [[User:Seemann|Seemann]]: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v2.8 by Paul Breeuwsma: http://www.paulinternet.nl/#sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Memory_Addresses_(SA)&amp;diff=3569</id>
		<title>Memory Addresses (SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Memory_Addresses_(SA)&amp;diff=3569"/>
		<updated>2008-09-11T19:30:41Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Garages and Parking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note that all offsets thus posted have been confirmed for GTA San Andreas (GTA_SA.EXE) version 1.0.'''&lt;br /&gt;
This is ''not'' for Function-Memadresses, for these look into [[Function Memory Addresses (SA)|Function Memory Addresses (SA)]].&lt;br /&gt;
&lt;br /&gt;
'''Note:''' None of the memory addresses below will work for GTA: San Andreas v2.0. All address in v2.0 have been changed or moved. Thus inaccessible.&lt;br /&gt;
&lt;br /&gt;
= Base Memory adresses =&lt;br /&gt;
&lt;br /&gt;
==No category yet==&lt;br /&gt;
* 0xA49D54 - [dword] Timer for driving/flying missions (in ms)&lt;br /&gt;
* 0xA51974 - [dword] Timer for boat/bike missions (in ms)&lt;br /&gt;
* 0xA51A3C - Timer for Bloodring race&lt;br /&gt;
* 0xB7CE50 - [dword] Money&lt;br /&gt;
* 0xBAA420 - Wanted Level&lt;br /&gt;
* 0x8CDEE4 - [dword] Max wanted level&lt;br /&gt;
* 0xB79038 - [dword] How many days have passed in game&lt;br /&gt;
* 0xB70153 - [byte] Current Hour&lt;br /&gt;
* 0xB70152 - [byte] Current Minute&lt;br /&gt;
* 0xB7014E - [byte] Current Weekday (1 through 7)&lt;br /&gt;
* 0x8CB7A5 - [byte] Current Radiostation-ID&lt;br /&gt;
* 0xB700F0 - [dword] Current Car ID (from vehicle.ide) - not for bikes&lt;br /&gt;
* 0x863984 - [float] Gravity&lt;br /&gt;
* 0xB7CB84 - [dword] A global timer in ms&lt;br /&gt;
* 0xB7CB64 - [float] Game speed in percent&lt;br /&gt;
* 0xB70158 - [dword] Timer related to weather and time in ms&lt;br /&gt;
* 0xB7015C - [dword] Defines how many ms (1 second... default 1000, set to 1 for a headache, number of ms per sec)&lt;br /&gt;
* 0xB7CEE4 - [byte/boolean] Is infinite run&lt;br /&gt;
* 0xB7CEE6 - [byte/boolean] Is player fireproof&lt;br /&gt;
* 0x96C009 - [byte/boolean] Is paynspray free&lt;br /&gt;
* 0xA444A4 - [byte/boolean] Is radar grey'd out&lt;br /&gt;
* 0x8D2530 - [float] Pedestrian density multiplier&lt;br /&gt;
* 0x8A5B20 - [float] Vehicle density multiplier&lt;br /&gt;
* 0xB6F065 - [byte/boolean] Widescreen (the view that is displayed during cutscenes, not the display option)&lt;br /&gt;
* 0xA4A948 - Lowrider hydrailics score&lt;br /&gt;
* 0xA4EC20 - Minigames dancing score&lt;br /&gt;
* 0xB790B8 - [byte] Photographs taken number (4 bytes)&lt;br /&gt;
* 0xA9AD74 - [byte] Tags number (4 bytes)&lt;br /&gt;
* 0xB791E4 - [byte] Horseshoes number (4 bytes)&lt;br /&gt;
* 0xB791EC - [byte] Oysters number (4 bytes)&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
For those number above if you change it to maximum amount they appear to pop a message and gives a bonus like weapons in cj savehouses.&lt;br /&gt;
&lt;br /&gt;
* 0x716642 - [float] Change solid clouds&lt;br /&gt;
* 0x716655 - [float] Disable solid clouds&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
Both values default to 200. If you change one of them to 100,000 you get very few clouds, a much nicer effect. If you change both of them to 100,000 you never get the clouds.&lt;br /&gt;
&lt;br /&gt;
* 0xB79078 - [byte] People dropped off in taxi (number used for the stats, 4 bytes)&lt;br /&gt;
* 0xA49C30 - [byte] People dropped off in taxi (number used for giving your reward, 4 bytes)&lt;br /&gt;
* 0xB79040 - [byte] Safehouse visits number (4 bytes)&lt;br /&gt;
* 0xA49EFC - [dword] Denise Progress&lt;br /&gt;
* 0xA49F00 - [dword] Michelle Progress&lt;br /&gt;
* 0xA49F04 - [dword] Helena Progress&lt;br /&gt;
* 0xA49F08 - [dword] Barbara Progress&lt;br /&gt;
* 0xA49F0C - [dword] Katie Progress&lt;br /&gt;
* 0xA49F10 - [dword] Millie Progress&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
These above six addresses are within the scm block, and valid only for original scm. setting a value to 100 (ie. 100 pct) gives you all gifts of that GF (ie. car keys, wardrobe etc.).&lt;br /&gt;
&lt;br /&gt;
* 0xB79108 - Number of girls dated&lt;br /&gt;
* 0xB79100 - Current number of girlfriends&lt;br /&gt;
* 0xB79104 - Number of disastrous dates&lt;br /&gt;
* 0xB79110 - Number of successfull dates&lt;br /&gt;
* 0xB79060 - Unique jumps found number&lt;br /&gt;
* 0xB79064 - Unique jumps done number&lt;br /&gt;
* 0xBA6774 - Map target:&lt;br /&gt;
** 0 = disabled&lt;br /&gt;
** 1 = enabled&lt;br /&gt;
* 0x86329C - List of valid command names&lt;br /&gt;
* 0xC17054 - Main game window HWND&lt;br /&gt;
* 0xC97C28 - IDirect3DDevice9 pointer&lt;br /&gt;
&lt;br /&gt;
==Stats==&lt;br /&gt;
* 0xB793D4 - [float] Fat stat&lt;br /&gt;
* 0xB793D8 - [float] Stamina stat&lt;br /&gt;
* 0xB793DC - [float] Muscle stat&lt;br /&gt;
* 0xB793E0 - [float] Health stat&lt;br /&gt;
* 0xB793E4 - [float] Sex Appeal stat&lt;br /&gt;
* 0xB79496 - [float] Pistol stat&lt;br /&gt;
* 0xB79498 - [float] Silenced pistol stat&lt;br /&gt;
* 0xB7949C - [float] Desert eagle stat&lt;br /&gt;
* 0xB794A0 - [float] Shotgun stat&lt;br /&gt;
* 0xB794A4 - [float] Sawn-off shotgun stat&lt;br /&gt;
* 0xB794A8 - [float] Combat shotgun stat&lt;br /&gt;
* 0xB794AC - [float] Machine pistol stat&lt;br /&gt;
* 0xB794B0 - [float] SMG stat&lt;br /&gt;
* 0xB794B4 - [float] AK47 stat&lt;br /&gt;
* 0xB794B8 - [float] M4 stat&lt;br /&gt;
&lt;br /&gt;
==HTML Stats File==&lt;br /&gt;
* 0x8663A0 - File Name ( Default : 'stats.html' )&lt;br /&gt;
* 0x86636C - File Title ( Default : '&amp;lt;title&amp;gt;Grand Theft Auto San Andreas Stats&amp;lt;/title&amp;gt;' )&lt;br /&gt;
&lt;br /&gt;
==Cheats==&lt;br /&gt;
[byte] Can be either on (1) or off (0).&lt;br /&gt;
* 0x969130 - Weapon Set 1&lt;br /&gt;
* 0x969131 - Weapon Set 2&lt;br /&gt;
* 0x969132 - Weapon Set 3&lt;br /&gt;
* 0x969133 - Health+Armor+250K&lt;br /&gt;
* 0x969134 - Increase Wanted Level 2 Stars&lt;br /&gt;
* 0x969135 - Clear Wanted Level&lt;br /&gt;
* 0x969136 - Sunny Weather&lt;br /&gt;
* 0x969137 - Very Sunny Weather&lt;br /&gt;
* 0x969138 - Overcast Weather&lt;br /&gt;
* 0x969139 - Rainy Weather&lt;br /&gt;
* 0x96913A - Foggy Weather&lt;br /&gt;
* 0x96913B - Faster Clock&lt;br /&gt;
* 0x96913C - Faster Gameplay&lt;br /&gt;
* 0x96913D - Slower Gameplay&lt;br /&gt;
* 0x96913E - Peds Attack Eachother with Golfclub&lt;br /&gt;
* 0x96913F - Have Bounty on Head&lt;br /&gt;
* 0x969140 - Everyone is Armed&lt;br /&gt;
* 0x969141 - ''Spawn Rhino ('''Not Tested!''')''&lt;br /&gt;
* 0x969142 - ''Spawn Bloodring Banger ('''Not Tested!''')''&lt;br /&gt;
* 0x969143 - ''Spawn Rancher ('''Not Tested!''')''&lt;br /&gt;
* 0x969144 - ''Spawn Racecar A ('''Not Tested!''')''&lt;br /&gt;
* 0x969145 - ''Spawn Racecar B ('''Not Tested!''')''&lt;br /&gt;
* 0x969146 - ''Spawn Romero ('''Not Tested!''')''&lt;br /&gt;
* 0x969147 - ''Spawn Stretch ('''Not Tested!''')''&lt;br /&gt;
&lt;br /&gt;
* 0x96914A - Blow up All Cars&lt;br /&gt;
* 0x96914B - Wheels Only (Invisible Cars)&lt;br /&gt;
* 0x96914C - Perfect Handling&lt;br /&gt;
* 0x96914D - Suicide&lt;br /&gt;
* 0x96914E - All Green Lights&lt;br /&gt;
* 0x96914F - Aggressive Drivers&lt;br /&gt;
* 0x969150 - Pink Traffic&lt;br /&gt;
* 0x969151 - Black Traffic&lt;br /&gt;
* 0x969153 - Boats Can Fly&lt;br /&gt;
* 0x969154 - CJ is Fat&lt;br /&gt;
* 0x969155 - Max Muscle&lt;br /&gt;
* 0x969156 - CJ is Skinny&lt;br /&gt;
* 0x969157 - Elvis Everywhere&lt;br /&gt;
* 0x969158 - Peds attack with rockets&lt;br /&gt;
* 0x969159 - Beach Theme&lt;br /&gt;
* 0x96915A - Gang Members everywhere&lt;br /&gt;
* 0x96915B - Gangs control the streets&lt;br /&gt;
* 0x96915C - Ninja Theme&lt;br /&gt;
* 0x96915D - Slut Magnet&lt;br /&gt;
* 0x96915E - Traffic is Cheap Cars&lt;br /&gt;
* 0x96915F - Traffic is Fast Cars&lt;br /&gt;
* 0x969160 - Cars can Fly&lt;br /&gt;
* 0x969161 - Huge Bunny Hop&lt;br /&gt;
* 0x969162 - ''Spawn Hydra ('''Not Tested!''')''&lt;br /&gt;
* 0x969163 - ''Spawn Vortex Hovercraft ('''Not Tested!''')''&lt;br /&gt;
* 0x969164 - Tank Mode/Smash'n Boom&lt;br /&gt;
* 0x969165 - All cars have nitro&lt;br /&gt;
* 0x969166 - Cars Float Away when hit&lt;br /&gt;
* 0x969167 - Always Midnight&lt;br /&gt;
* 0x969168 - Stop Game Clock - Orange Sky&lt;br /&gt;
* 0x969169 - Thunderstorm&lt;br /&gt;
* 0x96916A - Sandstorm&lt;br /&gt;
* 0x96916C - Mega Jump&lt;br /&gt;
* 0x96916D - Infinite Health&lt;br /&gt;
* 0x96916E - Infinite Oxygen&lt;br /&gt;
* 0x96916F - Get Parachute&lt;br /&gt;
* 0x969170 - Get Jetpack&lt;br /&gt;
* 0x969171 - Never Wanted&lt;br /&gt;
* 0x969172 - Six Star Wanted Level&lt;br /&gt;
* 0x969173 - Mega Punch&lt;br /&gt;
* 0x969174 - Never get Hungry&lt;br /&gt;
* 0x969175 - Peds Riot (Chaos Mode)&lt;br /&gt;
* 0x969176 - Funhouse Theme&lt;br /&gt;
* 0x969177 - Slower Gameplay&lt;br /&gt;
* 0x969178 - Infinite Ammo, No Reload&lt;br /&gt;
* 0x969179 - Full Weapon Aiming while driving&lt;br /&gt;
* 0x96917A - Decreased Traffic&lt;br /&gt;
* 0x96917B - Traffic is Country vehicles&lt;br /&gt;
* 0x96917C - Recruit Anyone (9mm)&lt;br /&gt;
* 0x96917D - Country Theme&lt;br /&gt;
* 0x96917E - Recruit Anyone (Rockets)&lt;br /&gt;
* 0x96917F - Max Respect&lt;br /&gt;
* 0x969180 - Max Sex Appeal&lt;br /&gt;
* 0x969181 - Max Stamina&lt;br /&gt;
* 0x969183 - Hitman in All Weapons&lt;br /&gt;
* 0x969184 - ''Spawn Hunter ('''Not Tested!''')''&lt;br /&gt;
* 0x969185 - ''Spawn Quad ('''Not Tested!''')''&lt;br /&gt;
* 0x969186 - ''Spawn Tanker Truck ('''Not Tested!''')''&lt;br /&gt;
* 0x969187 - ''Spawn Dozer ('''Not Tested!''')''&lt;br /&gt;
* 0x969188 - ''Spawn Stunt Plane ('''Not Tested!''')''&lt;br /&gt;
* 0x969189 - ''Spawn Monster ('''Not Tested!''')''&lt;br /&gt;
&lt;br /&gt;
[dword]&lt;br /&gt;
* 0x96918C - Has ever Cheated or not&lt;br /&gt;
* 0xBAA472 - Has now Cheated or not&lt;br /&gt;
* 0xB79044 - Cheated Count&lt;br /&gt;
&lt;br /&gt;
[byte]&lt;br /&gt;
* 0x96918C - 'Cheated' state:&lt;br /&gt;
** 0 = disabled&lt;br /&gt;
** 1 = enabled&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
If it's set to 1 you'll get a warning message when saving a game. But this byte doesn't get set if you use a cheat enabler.&lt;br /&gt;
&lt;br /&gt;
==Display Settings==&lt;br /&gt;
* 0xBA6784 - [dword] Brightness&lt;br /&gt;
* 0xBA6792 - [byte] Legend&lt;br /&gt;
* 0xBA676C - [byte] Radar Mode&lt;br /&gt;
* 0xBA6769 - [byte] Hud Mode&lt;br /&gt;
* 0xBA678C - [byte] Subtitles&lt;br /&gt;
* 0xBA6830 - [byte] Store gallery photos&lt;br /&gt;
* 0xBA6788 - [float] Draw Distance&lt;br /&gt;
* 0xBA6794 - [byte] Frame limiter&lt;br /&gt;
* 0xBA6793 - [byte] Widescreen&lt;br /&gt;
* 0xA9AE54 - [byte] Visual FX Quality&lt;br /&gt;
* 0xBA680C - [byte] Mip Mapping&lt;br /&gt;
* 0xBA6814 - [byte] Antialiasing values:&lt;br /&gt;
** 1 = 0x (off)&lt;br /&gt;
** 2 = 1x&lt;br /&gt;
** 3 = 2x&lt;br /&gt;
** 4 = 3x&lt;br /&gt;
* 0xBA6820 - [byte] Resolution values:&lt;br /&gt;
** 11 = 640x480&lt;br /&gt;
** 12 = 800x400&lt;br /&gt;
** 13 = 800x600&lt;br /&gt;
** 15 = 1024x768&lt;br /&gt;
:(Depends on the graphic driver/hardware.)&lt;br /&gt;
&lt;br /&gt;
==Sound Configuration==&lt;br /&gt;
* 0xBA6798 - [byte] Radio Volume [0 through 64]&lt;br /&gt;
* 0xBA6797 - [byte] SFX Volume [0 through 64]&lt;br /&gt;
* 0xBA6799 - [byte] Radio Equalizer&lt;br /&gt;
* 0xBA6795 - [byte] Radio Auto-tune&lt;br /&gt;
* 0xBA67F8 - [byte] Usertrack/Play mode values:&lt;br /&gt;
** 0 = radio&lt;br /&gt;
** 1 = random&lt;br /&gt;
* 0xBA680D - [byte] Usertrack/Automatic Media Scan&lt;br /&gt;
* 0xBA679A - [byte] Radio Station ID values:&lt;br /&gt;
** 1 to 12 (see below for station names according to ID)&lt;br /&gt;
*** 1 = &amp;quot;Playback FM&amp;quot;&lt;br /&gt;
*** 2 = &amp;quot;K Rose&amp;quot;&lt;br /&gt;
*** 3 = &amp;quot;K-DST&amp;quot;&lt;br /&gt;
*** 4 = &amp;quot;Bounce FM&amp;quot;&lt;br /&gt;
*** 5 = &amp;quot;SF-UR&amp;quot;&lt;br /&gt;
*** 6 = &amp;quot;Radio Los Santos&amp;quot;&lt;br /&gt;
*** 7 = &amp;quot;Radio X&amp;quot;&lt;br /&gt;
*** 8 = &amp;quot;CSR 103.9&amp;quot;&lt;br /&gt;
*** 9 = &amp;quot;K-JAH West&amp;quot;&lt;br /&gt;
*** 10 = &amp;quot;Master Sounds 98.3&amp;quot;&lt;br /&gt;
*** 11 = &amp;quot;WCTR Talk Radio&amp;quot;&lt;br /&gt;
*** 12 = &amp;quot;User Track Player&amp;quot;&lt;br /&gt;
*** 13 = &amp;quot;Radio Off&amp;quot;&lt;br /&gt;
&lt;br /&gt;
AlienX: &lt;br /&gt;
Seems that the Radio Station ID is just a menu identifier, this does not acctually change the radio station while in-game!&lt;br /&gt;
&lt;br /&gt;
Another note... The opcode for switching players radio stations does not work in line with the station ID's, i have yet to figure out what station ID's are for the SCM code - Dont try to use the above ID's for the SCM Operation Code, it just wont work&lt;br /&gt;
&lt;br /&gt;
Thanks to AlienX For the station names and ID's&lt;br /&gt;
&lt;br /&gt;
==Controller Configuration==&lt;br /&gt;
* 0xBA6818 - [byte] Controller Configuration values:&lt;br /&gt;
** 0 = mouse + keys&lt;br /&gt;
** 1 = joypad&lt;br /&gt;
* 0xB6EC1C - [float] Mouse sensivity&lt;br /&gt;
* 0xC1CC02 - [byte] Steer with mouse&lt;br /&gt;
* 0xC1CC03 - [byte] Invert mouse vertically&lt;br /&gt;
&lt;br /&gt;
*0xB6EC2E - REAL aiming mode offset, not menu:&lt;br /&gt;
**0 = joypad&lt;br /&gt;
**1 = mouse + keys&lt;br /&gt;
&lt;br /&gt;
==Other Dynamic Memory Addresses (non-static)==&lt;br /&gt;
&lt;br /&gt;
==Pedestrians==&lt;br /&gt;
===General===&lt;br /&gt;
* 0xB6F5F0 - Player pointer (CPed)&lt;br /&gt;
* 0xB7CD98 - Player pointer, direct offset to the ped pool start (CPed)&lt;br /&gt;
* 0xB74498 - CPeds maximum number (normally 140)&lt;br /&gt;
* 0xB74490 - Contains a pointer to a pointer&lt;br /&gt;
This pointer:&lt;br /&gt;
* +0 = Contains a pointer to the first element in the pool&lt;br /&gt;
* +4 = Contains a pointer to a byte map indicating which elements are in use&lt;br /&gt;
* +8 = [dword] Is the maximum number of elements in the pool&lt;br /&gt;
* +12 = [dword] Is the current number of elements in the pool&lt;br /&gt;
&lt;br /&gt;
Each ped object is 1988 (0x7C4) bytes.&lt;br /&gt;
&lt;br /&gt;
For each ped in the pool:&lt;br /&gt;
&lt;br /&gt;
In most cases, you can use even the dword of playeraddress as CPed value&lt;br /&gt;
* CPed +0x14 = Pointer to XYZ position structure (and rotation)&lt;br /&gt;
** (CPed+0x14) +0x0 to +0x2C = [dword] Is the rotation matrix&lt;br /&gt;
** (CPed+0x14) +0x30 = [dword] XPos&lt;br /&gt;
** (CPed+0x14) +0x34 = [dword] YPos&lt;br /&gt;
** (CPed+0x14) +0x38 = [dword] ZPos&lt;br /&gt;
* CPed +0x2F = [byte] Location status:&lt;br /&gt;
** 0 = outside&lt;br /&gt;
** 3 = inside a building&lt;br /&gt;
* CPed +0x42 = [float] Is the BP/EP/FP/DP (special flags) status of the player as follows:&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Add these values, and write the sum into +66 (0x42).&amp;lt;/i&amp;gt;&lt;br /&gt;
** 1 = makes ped soft (ie. can move through walls and everything) (noclip in other words)&lt;br /&gt;
** 2 = freezes ped (ie. ped cannot walk)&lt;br /&gt;
** 4 = bullet-proof&lt;br /&gt;
** 8 = flame-proof&lt;br /&gt;
** 16 = ?&lt;br /&gt;
** 32 = ?&lt;br /&gt;
** 64 = damage-proof (from collisions etc)&lt;br /&gt;
** 128 = explosion-proof&lt;br /&gt;
* CPed +0xC0 = [dword] Pointer to nearest car&lt;br /&gt;
* CPed +0x15C = Some anim states:&lt;br /&gt;
** 0 = landing from jump&lt;br /&gt;
** 61 = punching&lt;br /&gt;
** 102 = stopped&lt;br /&gt;
** 154 = sprint&lt;br /&gt;
** 205 = run&lt;br /&gt;
* Cped +0x46C = [byte] Player check:&lt;br /&gt;
** 0 = in air/water&lt;br /&gt;
** 1 = in car&lt;br /&gt;
** 2 = entering interior&lt;br /&gt;
** 3 = on foot&lt;br /&gt;
* CPed +0x46D = Jump state:&lt;br /&gt;
** 32 = landed/idle&lt;br /&gt;
** 34 = in air&lt;br /&gt;
** 36 = landing&lt;br /&gt;
* CPed +0x46F = Crouch state:&lt;br /&gt;
** 128 = stand&lt;br /&gt;
** 132 = crouched&lt;br /&gt;
* CPed +0x47C = Pointer to anim struct&lt;br /&gt;
* CPed +0x4DF = Current anim play-state:&lt;br /&gt;
** 0 = nothing&lt;br /&gt;
** 61 = starting/stopping&lt;br /&gt;
** 62 = looping&lt;br /&gt;
* CPed +0x504 = [word] Muzzle flash intensity:&lt;br /&gt;
** 0 to 10000 = on&lt;br /&gt;
** 65536 = off&lt;br /&gt;
* CPed +0x530 = [dword] State:&lt;br /&gt;
** 0 = leaving a car, falling down from a bike or something like this&lt;br /&gt;
** 1 = normal case&lt;br /&gt;
** 50 = driving&lt;br /&gt;
** 55 = wasted&lt;br /&gt;
** 63 = busted&lt;br /&gt;
* CPed +0x534 = Runningstate:&lt;br /&gt;
** 0 = while driving&lt;br /&gt;
** 1 = standing still&lt;br /&gt;
** 4 = start to run&lt;br /&gt;
** 6 = running&lt;br /&gt;
** 7 = running fast (sprinting) by pressing sprint key&lt;br /&gt;
* CPed +0x540 = [float] Health&lt;br /&gt;
* CPed +0x544 = [float] Max health&lt;br /&gt;
* CPed +0x548 = [float] Armor&lt;br /&gt;
* CPed +0x558 = [float] Z angle&lt;br /&gt;
* CPed +0x568 = [dword] Current Car you are in contact with&lt;br /&gt;
* CPed +0x584 = [dword] Current Entity you are in contact with&lt;br /&gt;
* CPed +0x58C = [dword] Last or Current Driven Car (CarPointer)&lt;br /&gt;
* CPed +0x598 = [byte] PLayer lock (set to 1 to lock player controls, can't move)&lt;br /&gt;
* CPed +0x5A0 = [byte] Start of weapon data (28 bytes) (See structures: WeaponSlot)&lt;br /&gt;
* CPed +0x5D8 = [dword] Pistol weapon type:&lt;br /&gt;
** 22 = 9mm&lt;br /&gt;
** 23 = silenced 9mm&lt;br /&gt;
** 24 = desert eagle&lt;br /&gt;
* CPed +0x5DC = [dword] Pistol state&lt;br /&gt;
* CPed +0x5E0 = [dword] Pistol ammo in clip&lt;br /&gt;
* CPed +0x5E4 = [dword] Pistol total ammo (including clip)&lt;br /&gt;
* CPed +0x5F4 = [dword] Shotgun weapon type:&lt;br /&gt;
** 25 = shotgun&lt;br /&gt;
** 26 = sawn-off shotgun&lt;br /&gt;
** 27 = spas-12&lt;br /&gt;
* CPed +0x5F8 = [dword] Shotgun state:&lt;br /&gt;
** 1 = firing?&lt;br /&gt;
** 2 = reloading&lt;br /&gt;
* CPed +0x5FC = [dword] Shotgun ammo in clip&lt;br /&gt;
* CPed +0x600 = [dword] Shotgun total ammo (including clip)&lt;br /&gt;
* CPed +0x718 = [byte] Current weapon slot (1 byte)&lt;br /&gt;
* CPed +0x740 = Current Weapon ID (from [[default.dat]])&lt;br /&gt;
* CPed +0x760 = [dword] Weapon you were killed with&lt;br /&gt;
* CPed +0x764 = [dword] Pointer to the ped that killed you&lt;br /&gt;
&lt;br /&gt;
===Structures===&lt;br /&gt;
 WeaponSlot                 // Total 28Bytes&lt;br /&gt;
  DWORD       type          // + 0&lt;br /&gt;
  DWORD       state         // + 4 (0 idle, 1 firing, 2 reloading)&lt;br /&gt;
  DWORD       AmmoInClip    // + 8&lt;br /&gt;
  DWORD       AmmoRemaining // +12&lt;br /&gt;
  FLOAT       unknown       // +16 (increases each time you fire your weapon, 0 when weapon not active, &lt;br /&gt;
                               probably used to count bullets fired to know when to reload?)&lt;br /&gt;
  UNKNOWN     0..7 Bytes    // +20 (unknown - goggle mode, 0 off and 256 on)...+27&lt;br /&gt;
&lt;br /&gt;
 WeaponSlot.type&lt;br /&gt;
   (Slot0: No Weapon)                    (Slot2: Handguns)&lt;br /&gt;
   0 - Fist                               22 - Pistol&lt;br /&gt;
   1 - Brass Knuckles                     23 - Silenced Pistol&lt;br /&gt;
   (Slot1: Melee)                         24 - Desert Eagle&lt;br /&gt;
   2 - Golf Club                         (Slot3: Shotguns)&lt;br /&gt;
   3 - Nitestick                          25 - Shotgun&lt;br /&gt;
   4 - Knife                              26 - Sawn-Off Shotgun&lt;br /&gt;
   5 - Baseball Bat                       27 - SPAS-12&lt;br /&gt;
   6 - Shovel                            (Slot4: Sub-Machineguns)&lt;br /&gt;
   7 - Pool Cue                           28 - Micro Uzi &lt;br /&gt;
   8 - Katana                             29 - MP5&lt;br /&gt;
   9 - Chainsaw                           32 - TEC-9&lt;br /&gt;
   15 - Cane&lt;br /&gt;
   (Slot5: Machineguns)                   (Slot10: Gifts)&lt;br /&gt;
   30 - AK47                              14 - Flowers&lt;br /&gt;
   31 - M4                                (Slot9:Special1)&lt;br /&gt;
   (Slot6: Rifles)                        42 - Fire Extinguisher&lt;br /&gt;
   33 - Country Rifle                     43 - Camera &lt;br /&gt;
   34 - Sniper Rifle                      (Slot11:Special2)&lt;br /&gt;
   (Slot7: Heavy Weapons)                 44 - NV Goggles&lt;br /&gt;
   35 - Rocket Launcher                   45 - IR Goggles&lt;br /&gt;
   36 - Heat Seaking RPG                  46 - Parachute&lt;br /&gt;
   37 - Flame Thrower                     (Slot12:Detonators)&lt;br /&gt;
   38 - Minigun                            40 - Detonator(for remote explosives)&lt;br /&gt;
   (Slot8: Projectiles)&lt;br /&gt;
   16 - Grenade&lt;br /&gt;
   18 - Molotov Cocktail&lt;br /&gt;
   39 - Remote Explosives&lt;br /&gt;
   (No slot: Fired from hunter / hydra / missile launcher)&lt;br /&gt;
   (This type is stored in the rocket pool as rocket type, but is the continuation of this list)&lt;br /&gt;
   19 - Normal rockets&lt;br /&gt;
   20 - Heatseeking rockets&lt;br /&gt;
   58 - Flares&lt;br /&gt;
&lt;br /&gt;
==Cars==&lt;br /&gt;
* 0xB6F980 - Is the direct pointer to the pool start (CVehicle)&lt;br /&gt;
* 0xB74494 - Contains a pointer&lt;br /&gt;
This pointer:&lt;br /&gt;
* +0 = Contains a pointer to the first element in the pool&lt;br /&gt;
* +4 = Contains a pointer to a byte map indicating which elements are in use&lt;br /&gt;
* +8 = [dword] Is the maximum number of elements in the pool&lt;br /&gt;
* +12 = [dword] Is the current number of elements in the pool&lt;br /&gt;
&lt;br /&gt;
Each vehicle object is 2584 (0xA18) bytes. It starts at 0xC502AA0.&lt;br /&gt;
&lt;br /&gt;
For each vehicle in the pool:&lt;br /&gt;
&lt;br /&gt;
* +20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes):&lt;br /&gt;
** +0 = [float] X-axis Rotation (Grad)&lt;br /&gt;
** +4 = [float] Y-axis Rotation (Grad)&lt;br /&gt;
** +8 = [float] Z-axis Rotation (Grad)&lt;br /&gt;
** +16 = [float] X-axis Rotation (Looking)&lt;br /&gt;
** +20 = [float] Y-axis Rotation (Looking)&lt;br /&gt;
** +24 = [float] Z-axis Rotation (Looking)&lt;br /&gt;
** +48 = [float] X-axis Position&lt;br /&gt;
** +52 = [float] Y-axis Position&lt;br /&gt;
** +56 = [float] Z-axis Position&lt;br /&gt;
* +34 = [word] Vehicle ID from vehicles.ide&lt;br /&gt;
* +66 = [byte] Is the BP/EP/DP/DP (Special Flags) status of the car as follows:&amp;lt;br&amp;gt;&amp;lt;i&amp;gt;Add these values, and write the sum into +66&amp;lt;/i&amp;gt;&lt;br /&gt;
** 1 = n/a&lt;br /&gt;
** 2 = n/a&lt;br /&gt;
** 4 = bullet-proof&lt;br /&gt;
** 8 = fire-proof&lt;br /&gt;
** 16 = damage-proof (from collisions etc)&lt;br /&gt;
** 32 = n/a&lt;br /&gt;
** 64 = n/a&lt;br /&gt;
** 128 = explosion-proof&lt;br /&gt;
* +68 = [float] X (East-West) speed&lt;br /&gt;
* +72 = [float] Y (North-South) speed&lt;br /&gt;
* +76 = [float] Z (Up-Down) speed&lt;br /&gt;
* +80 = [float] X (NS) Spin&lt;br /&gt;
* +84 = [float] Y (EW) Spin&lt;br /&gt;
* +88 = [float] Z (NW) Spin&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
Do not get confused about the Spin Angles, these are NOT rotations but the angles of how fast your vehicle is turning in the given axis direction...&lt;br /&gt;
&lt;br /&gt;
(Car addresses continued:)&lt;br /&gt;
* +140 = [float] Mass (kg) from handling.cfg&lt;br /&gt;
* +144 = [float] Turn Mass from handling.cfg&lt;br /&gt;
* +148 = [float] Grip Divider:&lt;br /&gt;
** 1.0 = 1 x gGrip&lt;br /&gt;
** 10.1 = 10 x gGrip&lt;br /&gt;
** 100.0 = g / 100Grip&lt;br /&gt;
* +152 = [float] Mass-to-Grip Multiplier. Ie. G Force when flying/during suspension/driving (acceleration towards ground)&lt;br /&gt;
* +160 = [float] Normalized Grip Level&lt;br /&gt;
* +164 = [float] CoM X&lt;br /&gt;
* +168 = [float] CoM Y&lt;br /&gt;
* +172 = [float] CoM Z&lt;br /&gt;
* +1064 = [byte] Engine State (whether the engine is running or stalled):&lt;br /&gt;
** 0 = stalled&lt;br /&gt;
** 16 = ok&lt;br /&gt;
* +1069 = [byte] Siren on/off&lt;br /&gt;
* +1076 = [byte] Body Color (as in [[carcolors.dat]], black being the 0)&lt;br /&gt;
* +1077 = [byte] Stripe Color (as in [[carcolors.dat]], black being the 0)&lt;br /&gt;
* +1078 = [byte] Body Color #2&lt;br /&gt;
* +1079 = [byte] Stripe Color #2&lt;br /&gt;
* +1080 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1084 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1088 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1092 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1096 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1100 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1104 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1108 = [dword] modding data as in garage info (Not working?)&lt;br /&gt;
* +1112 = [float] Car Wheel Size from vehicle.ide&lt;br /&gt;
* +1116 = [dword] Time left for car alarm to sound in ms&lt;br /&gt;
* +1120 = [dword] Pointer to driver&lt;br /&gt;
* +1124 = [dword] Pointer to passenger 1 (Front-right seat)&lt;br /&gt;
* +1128 = [dword] Pointer to passenger 2 (Rear-left seat)&lt;br /&gt;
* +1132 = [dword] Pointer to passenger 3 (Rear-right seat)&lt;br /&gt;
* +1136 = [dword] Pointer to passenger 4 (Used for buses)&lt;br /&gt;
* +1140 = [dword] Pointer to passenger 5 (Used for buses)&lt;br /&gt;
* +1144 = [dword] Pointer to passenger 6 (Used for buses)&lt;br /&gt;
* +1148 = [dword] Pointer to passenger 7 (Used for buses)&lt;br /&gt;
* +1152 = [dword] Pointer to passenger 8 (Used for buses)&lt;br /&gt;
* +1156 = [dword] Pointer to passenger 9 (Used for buses)&lt;br /&gt;
* +1172 = [float] Steer angle 1&lt;br /&gt;
* +1176 = [float] Steer angle 2&lt;br /&gt;
* +1180 = [float] Gas pedal&lt;br /&gt;
* +1184 = [float] Brake pedal&lt;br /&gt;
* +1192 = [byte] Places a car-bomb:&lt;br /&gt;
** 0 = no bomb&lt;br /&gt;
** 1 = car has bomb, but not armed&lt;br /&gt;
** 4 = car has bomb, and is armed&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
You can set the above values to 0 and 1 to give the car a bomb. Some other flags get set when you arm the bomb. So if you set this value to 4, or actually arm the bomb thru normal gameplay, it does not help to change this value back.&lt;br /&gt;
&lt;br /&gt;
* +1216 = [float] Health/Car Damage Left:&lt;br /&gt;
** &amp;lt;250.0 = on fire&lt;br /&gt;
** 1000.0 = undamaged&lt;br /&gt;
* +1272 = [dword] Car Door Locked State:&lt;br /&gt;
** 1 = open&lt;br /&gt;
** 2 = locked&lt;br /&gt;
* +1300 = [dword] Alternate siren (honking):&lt;br /&gt;
** 0 = off&lt;br /&gt;
** 1 = on&lt;br /&gt;
* +1412 = [dword] Headlights switch:&lt;br /&gt;
** 0 = off&lt;br /&gt;
** 1 = on&lt;br /&gt;
* +1424 = [byte] Car type:&lt;br /&gt;
** 0 = car/plane&lt;br /&gt;
** 5 = boat&lt;br /&gt;
** 6 = train&lt;br /&gt;
** 9 = bike&lt;br /&gt;
* +1444 = [float] Train speed:&lt;br /&gt;
** -0.1 = is forward&lt;br /&gt;
** 0.1 = is reverse&lt;br /&gt;
* +1445 = [byte] Car Tire (Left-Front) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
** 2 = Used by planes when landing gear is up&lt;br /&gt;
* +1446 = [byte] Car Tire (Left-Rear) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
** 2 = Used by planes when landing gear is up&lt;br /&gt;
* +1447 = [byte] Car Tire (Right-Front) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
** 2 = Used by planes when landing gear is up&lt;br /&gt;
* +1448 = [byte] Car Tire (Right-Rear) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
** 2 = Used by planes when landing gear is up&lt;br /&gt;
* +1628 = [byte] Bike Tire (Front) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
* +1629 = [byte] Bike Tire (Rear) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = flat&lt;br /&gt;
* +1630 = [byte] Bicycle Tire (Front) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = shot&lt;br /&gt;
* +1631 = [byte] Bicycle Tire (Rear) Status:&lt;br /&gt;
** 0 = ok&lt;br /&gt;
** 1 = shot&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
You cannot actually shoot the wheels of bmx. If you set the value 1 at above two offsets, it rides as if the wheels were shot. They probably not work.&lt;br /&gt;
&lt;br /&gt;
* +1736 = [byte] Is the bike identifier. Gets set to 1 if this vehicle is a bike (or bmx)&lt;br /&gt;
* +2020 = [float] Front-Left suspension height&lt;br /&gt;
* +2024 = [float] Rear-Left suspension height&lt;br /&gt;
* +2028 = [float] Front-Right suspension height&lt;br /&gt;
* +2032 = [float] Rear-Right suspension height&lt;br /&gt;
* +2276 = [float] Burn Timer (in ms)&lt;br /&gt;
&lt;br /&gt;
Let's say, the Car Position of this given car starts at 0xC5F5DB4:&lt;br /&gt;
* +0 = X Level to the ground&lt;br /&gt;
* +4 = Y Level to the ground&lt;br /&gt;
* +8 = Z Level to the ground&lt;br /&gt;
* +16 = X Where am I looking&lt;br /&gt;
* +20 = Y Where am I looking&lt;br /&gt;
* +24 = Z Where am I looking&lt;br /&gt;
* +32 = Dyn flight data&lt;br /&gt;
* +36 = Dyn flight data&lt;br /&gt;
* +40 = Dyn flight data&lt;br /&gt;
* +48 = CarPosX&lt;br /&gt;
* +52 = CarPosY&lt;br /&gt;
* +56 = CarPosZ&lt;br /&gt;
&lt;br /&gt;
Following offsets are Floats, as positions of doors and other car parts that gets detached by damage. We need to recalculate and set their locations if we warp a car from one location to another. Otherwise the car spins uncontrollably:&lt;br /&gt;
* +1828 = Detachables1 Pos X&lt;br /&gt;
* +1832 = Detachables1 Pos Y&lt;br /&gt;
* +1836 = Detachables1 Pos Z&lt;br /&gt;
* +1872 = Detachables2 Pos X&lt;br /&gt;
* +1876 = Detachables2 Pos Y&lt;br /&gt;
* +1880 = Detachables2 Pos Z&lt;br /&gt;
* +1916 = Detachables3 Pos X&lt;br /&gt;
* +1920 = Detachables3 Pos Y&lt;br /&gt;
* +1924 = Detachables3 Pos Z&lt;br /&gt;
* +1960 = Detachables4 Pos X&lt;br /&gt;
* +1964 = Detachables4 Pos Y&lt;br /&gt;
* +1968 = Detachables4 Pos Z&lt;br /&gt;
&lt;br /&gt;
The locations of the detachable objects are different for cars and bikes.  This is merely because bike object is actually smaller than the car object.  The car object is used for all vehicles (including heli) but the bikes.&lt;br /&gt;
&lt;br /&gt;
Offsets for Detachables:&lt;br /&gt;
* +1532 = BikeDetachPosAdr(0)&lt;br /&gt;
* +1632 = BikeDetachPosAdr(1)&lt;br /&gt;
* +1676 = BikeDetachPosAdr(2)&lt;br /&gt;
* +1720 = BikeDetachPosAdr(3)&lt;br /&gt;
* +1764 = BikeDetachPosAdr(4)&lt;br /&gt;
&lt;br /&gt;
* +1828 = CarDetachPosAdr(0)&lt;br /&gt;
* +1872 = CarDetachPosAdr(1)&lt;br /&gt;
* +1916 = CarDetachPosAdr(2)&lt;br /&gt;
* +1960 = CarDetachPosAdr(3)&lt;br /&gt;
&lt;br /&gt;
The trailer of the tanker is handled the same way as the vehicles. Its pointer gets set at offset:&lt;br /&gt;
* +0x4C8&lt;br /&gt;
To the car object start. When warping vehicles that has trailer, we need to warp this 'vehicle' as well.&lt;br /&gt;
The same pointer is used also when you are towing other vehicles as well.&lt;br /&gt;
&lt;br /&gt;
==Wanted==&lt;br /&gt;
0xB7CD9C - Wanted pool start (CWanted). Each slot has 668 bytes of data.&lt;br /&gt;
&lt;br /&gt;
* +0x0 = Is the counter for how pissed the cops are:&lt;br /&gt;
** above 50 = 1 star&lt;br /&gt;
** above 180 = 2 stars&lt;br /&gt;
** above 550 = 3 stars&lt;br /&gt;
** above 1200 = 4 stars&lt;br /&gt;
** above 2400 = 5 stars&lt;br /&gt;
** above 4600 = 6 stars&lt;br /&gt;
* +0x2C = [dword] Current wanted level&lt;br /&gt;
* +0x19 = [byte] Number of cops simultaniously shooting at you&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
Helicopters will still shoot if you change this to 0.&lt;br /&gt;
&lt;br /&gt;
==Camera==&lt;br /&gt;
* 0xB6F028 - Camera Block Start (CCamera)&lt;br /&gt;
* 0x52B730 - Start of camera 'MOVer' subroutine:&lt;br /&gt;
** 0xC3 = lock camera (retn)&lt;br /&gt;
* 0xB6F0DC - [dword] Current View:&lt;br /&gt;
** 0 = bumper View&lt;br /&gt;
** 1 = close external view&lt;br /&gt;
** 2 = middle external view&lt;br /&gt;
** 3 = furthest external view&lt;br /&gt;
** 4 = nothing = same as last?&lt;br /&gt;
** 5 = cinematic view&lt;br /&gt;
** 6 to INF = same as 4?&lt;br /&gt;
* 0xB6F0E0 - [float] Car View Distance (arm length)&lt;br /&gt;
* 0xB6F0E8 - [float] True View Distance (true arm length)&lt;br /&gt;
&lt;br /&gt;
==Ignored==&lt;br /&gt;
0xB7CD9C - Ignored pointer (CIgnored).&lt;br /&gt;
&lt;br /&gt;
* +0x1E = [byte/boolean] Is player ignored by cops&lt;br /&gt;
* +0x298 = [byte/boolean] Is player ignored by everyone&lt;br /&gt;
&lt;br /&gt;
==Pools==&lt;br /&gt;
See the [[Data Pools]] funtions in the [[Function Memory Addresses (SA)]] section.&lt;br /&gt;
&lt;br /&gt;
0x550F10 - AllocatePools function.&lt;br /&gt;
&lt;br /&gt;
* 00B74484 - PtrNode Single&lt;br /&gt;
* 00B74488 - PtrNode Double&lt;br /&gt;
* 00B7448C - EntryInfoNode&lt;br /&gt;
* 00B74490 - Peds&lt;br /&gt;
* 00B74494 - Vehicles&lt;br /&gt;
* 00B74498 - Buildings&lt;br /&gt;
* 00B7449C - Objects&lt;br /&gt;
* 00B744A0 - Dummys&lt;br /&gt;
* 00B744A4 - ColModel&lt;br /&gt;
* 00B744A8 - Task&lt;br /&gt;
* 00B744AC - Event&lt;br /&gt;
* 00B744B0 - PointRoute&lt;br /&gt;
* 00B744B4 - PatrolRoute&lt;br /&gt;
* 00B744B8 - NodeRoute&lt;br /&gt;
* 00B744CC - TaskAllocator&lt;br /&gt;
* 00B744C0 - PedIntelligence&lt;br /&gt;
* 00B744C4 - PedAttractors&lt;br /&gt;
&lt;br /&gt;
==Target==&lt;br /&gt;
0xB6F3B8 = Pointer to Target.&lt;br /&gt;
&lt;br /&gt;
* +0x79C = Targetted CPed:&lt;br /&gt;
** 0 = no cped targetted&lt;br /&gt;
* +0xC0 = Pointer to last object (ped, car, maybe others) you collided with&lt;br /&gt;
&lt;br /&gt;
==Handling==&lt;br /&gt;
0xC2B9DC - Handling Block Start. Each slot has 224 bytes of data.&lt;br /&gt;
&lt;br /&gt;
* +0x0 = [dword] Index/Identifier&lt;br /&gt;
* +0x4 = fMass&lt;br /&gt;
* +0x8 = 1.0 / fMass&lt;br /&gt;
* +0xC = fTurnMass&lt;br /&gt;
* +0x10 = fDragMult&lt;br /&gt;
* +0x14 = CentreOfMass.x&lt;br /&gt;
* +0x18 = CentreOfMass.y&lt;br /&gt;
* +0x1C = CentreOfMass.z&lt;br /&gt;
* +0x20 = [byte] nPercentSubmerged&lt;br /&gt;
* +0x24 = fMass * 8.0000001e-1 / nPercentSubmerged&lt;br /&gt;
* +0x28 = fTractionMultiplier&lt;br /&gt;
* +0x74 = [byte] TransmissionData.nDriveType&lt;br /&gt;
* +0x75 = [byte] TransmissionData.nEngineType&lt;br /&gt;
* +0x76 = [byte] TransmissionData.nNumberOfGears&lt;br /&gt;
* +0x7C = TransmissionData.fEngineAcceleration (Multiplied by 3.9999999e-4)&lt;br /&gt;
* +0x80 = TransmissionData.fEngineInertia&lt;br /&gt;
* +0x84 = TransmissionData.fMaxVelocity (Multiplied by 5.5555599e-3)&lt;br /&gt;
* +0x94 = fBrakeDeceleration (Multiplied by 3.9999999e-4)&lt;br /&gt;
* +0x98 = fBrakeBias&lt;br /&gt;
* +0x9C = [byte] bABS&lt;br /&gt;
* +0xA0 = fSteeringLock&lt;br /&gt;
* +0xA4 = fTractionLoss&lt;br /&gt;
* +0xA8 = fTractionBias&lt;br /&gt;
* +0xAC = fSuspensionForceLevel&lt;br /&gt;
* +0xB0 = fSuspensionDampingLevel&lt;br /&gt;
* +0xB4 = fSuspensionHighSpdComDamp&lt;br /&gt;
* +0xB8 = Suspension upper limit&lt;br /&gt;
* +0xBC= Suspension lower limit&lt;br /&gt;
* +0xC0 = Suspension bias between front and rear&lt;br /&gt;
* +0xC4 = Suspension anti-dive multiplier&lt;br /&gt;
* +0xC8 = fCollisionDamageMultiplier (multiplier not yet found)&lt;br /&gt;
* +0xCC = [hex] modelFlags&lt;br /&gt;
* +0xD0 = [hex] handlingFlags&lt;br /&gt;
* +0xD4 = fSeatOffsetDistance&lt;br /&gt;
* +0xD8 = [dword] nMonetaryValue&lt;br /&gt;
* +0xDC = [byte] Front lights&lt;br /&gt;
* +0xDD = [byte] Rear lights&lt;br /&gt;
* +0xDE = [byte] Vehicle anim group&lt;br /&gt;
&lt;br /&gt;
==Controls==&lt;br /&gt;
0xB73458 - Start of controls block.&lt;br /&gt;
&lt;br /&gt;
* +0x20 = [word] Accelerate:&lt;br /&gt;
** 0 = off&lt;br /&gt;
** 255 = on&lt;br /&gt;
* +0x22 = [word] Brake&lt;br /&gt;
&lt;br /&gt;
==Rockets==&lt;br /&gt;
The rocket pool contains info on launched rockets (for example, Hydra rockets).&lt;br /&gt;
&lt;br /&gt;
0xC891A8 - Rocket pool start. Each slot has 36 bytes of data. There are 32 elements in the pool.&lt;br /&gt;
&lt;br /&gt;
* +0 = [dword] Rocket type:&lt;br /&gt;
** 16 = none&lt;br /&gt;
** 19 = normal&lt;br /&gt;
** 20 = heatseeking&lt;br /&gt;
** 58 = flare&lt;br /&gt;
* +4 = [dword] Pointer to launching vehicle&lt;br /&gt;
* +8 = [dword] Pointer to target vehicle (when heatseeking), 0 otherwise&lt;br /&gt;
* +16 = [byte] Does rocket exist?&lt;br /&gt;
** 0 = exploded/does not exist&lt;br /&gt;
** 1 = travelling&lt;br /&gt;
* +20 = [float] X-axis position&lt;br /&gt;
* +24 = [float] Y-axis position&lt;br /&gt;
* +28 = [float] Z-axis position&lt;br /&gt;
&lt;br /&gt;
==Race Checkpoints==&lt;br /&gt;
The checkpoints block that are used in the &amp;quot;illegal street racing&amp;quot; mini-games.&lt;br /&gt;
&lt;br /&gt;
0xC7F158 - Checkpoint block start. Each block is 38 bytes, but theres always only two at a time.&lt;br /&gt;
&lt;br /&gt;
* +0 = [byte] Type of checkpoint&lt;br /&gt;
* +2 = [byte] RGBA color value&lt;br /&gt;
* +4 = [float] X-axis Position&lt;br /&gt;
* +8 = [float] Y-axis Position&lt;br /&gt;
* +12 = [float] Z-axis Position&lt;br /&gt;
* +16 to +24 = [float] Rotation Matrix (direction from this checkpoint to the next, all floats)&lt;br /&gt;
* +32 = [float] Checkpoint radius&lt;br /&gt;
&lt;br /&gt;
==Garages and Parking==&lt;br /&gt;
'''Note, that the memory location of garages can vary depending on the scm script you use.'''&lt;br /&gt;
&lt;br /&gt;
There are [[Garage#San_Andreas_2|50 garages]] in the game. Each garage has:-&lt;br /&gt;
* Position&lt;br /&gt;
* Details&lt;br /&gt;
* Usage information&lt;br /&gt;
* Location in game&lt;br /&gt;
* Location of door&lt;br /&gt;
* Width&lt;br /&gt;
* Depth&lt;br /&gt;
* Height&lt;br /&gt;
* Direction it looks&lt;br /&gt;
* Coordinates of lower left corner&lt;br /&gt;
* Coordinates of upper right corner,&lt;br /&gt;
* Usable by the player&lt;br /&gt;
* Which property (safe house) it belongs&lt;br /&gt;
* Number of vehicles which can be parked inside&lt;br /&gt;
* The door state (closed, opening, open and closing)&lt;br /&gt;
&lt;br /&gt;
These are found in the garage object of 212 bytes. The memory locations where the garages start are:&lt;br /&gt;
* 0x96C048 (start of first garage)&lt;br /&gt;
* +0xD4 (offset for second garage - offset this much again for third garage, again for fourth, etc.)&lt;br /&gt;
* 0x96C120 (start of final garage)&lt;br /&gt;
&lt;br /&gt;
(Tested using non-patched original v1.0 German EXE with English language option selected, and original SCM file.)&lt;br /&gt;
&lt;br /&gt;
(UZI-I Tested Player Garage and Pay'n'Spray using Hoodlum Crack EXE with an Blank SCM)&lt;br /&gt;
&lt;br /&gt;
Here is the known garage offsets:&lt;br /&gt;
* +0 = [float] X Coord of the Garage Lower Left corner&lt;br /&gt;
* +4 = [float] Y Coord of the Garage Lower Left corner&lt;br /&gt;
* +8 = [float] Z Coord of the Garage Lower Left corner&lt;br /&gt;
* +12 = [float] X Value of direction vector 1&lt;br /&gt;
* +16 = [float] Y Value of direction vector 1&lt;br /&gt;
* +20 = [float] X Value of direction vector 2&lt;br /&gt;
* +24 = [float] Y Value of direction vector 2&lt;br /&gt;
* +28 = [float] Top Z Coord. of the garage&lt;br /&gt;
* +32 = [float] Normalized Width of the garage&lt;br /&gt;
* +36 = [float] Normalized Depth of the garage&lt;br /&gt;
* +40 = [float] Left Border (X) corrdinate&lt;br /&gt;
* +44 = [float] Right Border (X) corrdinate&lt;br /&gt;
* +48 = [float] Front Border (Y) corrdinate&lt;br /&gt;
* +52 = [float] Back Border (Y) corrdinate&lt;br /&gt;
* +56 = [float] Garage Door Position&lt;br /&gt;
* +60 = [dword] unknown (Timer)&lt;br /&gt;
* +64 = [dword] unknown (not saved)&lt;br /&gt;
* +68 = [chars] Garage Name (7 bytes + nul)&lt;br /&gt;
* +76 = [byte]  Garage Type&lt;br /&gt;
* +77 = [byte]  Garage Door State values:&lt;br /&gt;
** 0 = closed&lt;br /&gt;
** 1 = open&lt;br /&gt;
** 2 = closing&lt;br /&gt;
** 3 = opening&lt;br /&gt;
* +78 = [byte]  Door Flags&lt;br /&gt;
** 0x01      used mod shop (?)&lt;br /&gt;
** 0x02      inactive door&lt;br /&gt;
** 0x04      used Pay'n'Spray (?)&lt;br /&gt;
** 0x08      small door (reflective?)&lt;br /&gt;
** 0x10      up and in door&lt;br /&gt;
** 0x20      camera follows player&lt;br /&gt;
** 0x40      door is closed flag &lt;br /&gt;
** 0x80      girlfriend PnS&lt;br /&gt;
* +79 = [byte]  Original Type&lt;br /&gt;
The direction vector 3 is completely left out, I think because the garages are always even to the ground. I think that is also why the Z values of the direction vectors are also left-out. &lt;br /&gt;
Note: Direction Vectors marked above may be Quaternions.&lt;br /&gt;
&lt;br /&gt;
Here are the static Addresses of the Garage Blocks, and to which garage they belong:&lt;br /&gt;
* 0x96C048 - Commerce Region, Loading Bay Garage (Life's a Beach)&lt;br /&gt;
* 0x96C120 - LSPD Police Impound Garage&lt;br /&gt;
* 0x96C1F8 - Mission Garage near El Corona (Los Desperados)&lt;br /&gt;
* 0x96C2D0 - Eight Ball Autos near El Corona&lt;br /&gt;
* 0x96C3A8 - Mission Garage near El Corona (Cesar Vialpando)&lt;br /&gt;
* 0x96C480 - Player Garage: El Corona&lt;br /&gt;
* 0x96C558 - LS Burglary Garage near Playe del Seville&lt;br /&gt;
* 0x96C630 - LowRider Tuning Garage in Willowfield&lt;br /&gt;
* 0x96C708 - Pay 'n' Spray in Idlewood&lt;br /&gt;
* 0x96C7E0 - Player Garage: Johnson House&lt;br /&gt;
* 0x96C8B8 - Pay 'n' Spray in Temple&lt;br /&gt;
* 0x96C990 - Transfender in Temple&lt;br /&gt;
* 0x96CA68 - Pay 'n' Spray in Santa Maria Beach&lt;br /&gt;
* 0x96CB40 - Player Garage: Santa Maria Beach&lt;br /&gt;
* 0x96CC18 - Player Garage: Mulholland&lt;br /&gt;
* 0x96CCF0 - Wheel Archangels in Ocean Flats&lt;br /&gt;
* 0x96CDC8 - Mission Garage in Ocean Flats (T-Bone Mendez)&lt;br /&gt;
* 0x96CEA0 - Player Garage: Hashbury&lt;br /&gt;
* 0x96CF78 - Transfender near Wang Cars in Doherty&lt;br /&gt;
* 0x96D050 - Pay 'n' Spray near Wang Cars in Doherty&lt;br /&gt;
* 0x96D128 - SF Burglary Garage, Loading Bay near Doherty&lt;br /&gt;
* 0x96D200 - Player Garage: Doherty&lt;br /&gt;
* 0x96D2D8 - Mission Garage in Doherty Garage&lt;br /&gt;
* 0x96D3B0 - Woozie's Mission Garage in Chinatown (Ran Fa Li)&lt;br /&gt;
* 0x96D488 - Michelle's Pay 'n' Spray in Downtown&lt;br /&gt;
* 0x96D560 - Player Garage: Calton Heights&lt;br /&gt;
* 0x96D638 - SFPD Police Impound Garage&lt;br /&gt;
* 0x96D710 - Pay 'n' Spray in Juniper Hollow&lt;br /&gt;
* 0x96D7E8 - Player Garage: Paradiso&lt;br /&gt;
* 0x96D8C0 - LVPD Police Impound Garage&lt;br /&gt;
* 0x96D998 - Airport Plane Garage in Las Venturas&lt;br /&gt;
* 0x96DA70 - LV Burglary Garage near Camel's Toe&lt;br /&gt;
* 0x96DB48 - Pay 'n' Spray near Royal Casino&lt;br /&gt;
* 0x96DC20 - Transfender in come-a-lot&lt;br /&gt;
* 0x96DCF8 - Player Garage: Rockshore West&lt;br /&gt;
* 0x96DDD0 - Welding Wedding Bomb-workshop in Emerald Isle&lt;br /&gt;
* 0x96DEA8 - Pay 'n' Spray in Redsands East&lt;br /&gt;
* 0x96DF80 - Player Garage: Redsands West&lt;br /&gt;
* 0x96E058 - Player Garage: Prickle Pine&lt;br /&gt;
* 0x96E130 - Player Garage: Whitewood Estates&lt;br /&gt;
* 0x96E208 - Pay 'n' Spray in El Quebrados&lt;br /&gt;
* 0x96E2E0 - Pay 'n' Spray in Fort Carson&lt;br /&gt;
* 0x96E3B8 - Player Garage: Fort Carson&lt;br /&gt;
* 0x96E490 - Player Garage: Verdant Meadows&lt;br /&gt;
* 0x96E568 - Mission Garage in El Castillo del Diablo (Interdiction)&lt;br /&gt;
* 0x96E640 - Airport Garage in Verdant Meadows&lt;br /&gt;
* 0x96E718 - Mission Garage in Angel Pine (Puncture Wounds)&lt;br /&gt;
* 0x96E7F0 - Pay 'n' Spray in Dillimore&lt;br /&gt;
* 0x96E8C8 - Player Garage: Palomino Creek&lt;br /&gt;
* 0x96E9A0 - Player Garage: Dillimore&lt;br /&gt;
&lt;br /&gt;
Static Mem. Locations for garages:&lt;br /&gt;
* 0x96ABD8 - Johnson House Car 1&lt;br /&gt;
* 0x96AC18 - Johnson House Car 2&lt;br /&gt;
* 0x96AC58 - Johnson House Car 3&lt;br /&gt;
* 0x96AC98 - Johnson House Car 4&lt;br /&gt;
* 0x96ACD8 - Santa Maria Beach Car 1&lt;br /&gt;
* 0x96AD18 - Santa Maria Beach Car 2&lt;br /&gt;
* 0x96AD58 - Santa Maria Beach Car 3&lt;br /&gt;
* 0x96AD98 - Santa Maria Beach Car 4&lt;br /&gt;
* 0x96ADD8 - Rockshore West Car 1&lt;br /&gt;
* 0x96AE18 - Rockshore West Car 2&lt;br /&gt;
* 0x96AE58 - Rockshore West Car 3&lt;br /&gt;
* 0x96AE98 - Rockshore West Car 4&lt;br /&gt;
* 0x96AED8 - Fort Carson Car 1&lt;br /&gt;
* 0x96AF18 - Fort Carson Car 2&lt;br /&gt;
* 0x96AF58 - Fort Carson Car 3&lt;br /&gt;
* 0x96AF98 - Fort Carson Car 4&lt;br /&gt;
* 0x96AFD8 - Verdant Meadows Car 1&lt;br /&gt;
* 0x96B018 - Verdant Meadows Car 2&lt;br /&gt;
* 0x96B058 - Verdant Meadows Car 3&lt;br /&gt;
* 0x96B098 - Verdant Meadows Car 4&lt;br /&gt;
* 0x96B0D8 - Dillimore Car 1&lt;br /&gt;
* 0x96B118 - Dillimore Car 2&lt;br /&gt;
* 0x96B158 - Dillimore Car 3&lt;br /&gt;
* 0x96B198 - Dillimore Car 4&lt;br /&gt;
* 0x96B1D8 - Prickle Pine Car 1&lt;br /&gt;
* 0x96B218 - Prickle Pine Car 2&lt;br /&gt;
* 0x96B258 - Prickle Pine Car 3&lt;br /&gt;
* 0x96B298 - Prickle Pine Car 3&lt;br /&gt;
* 0x96B2D8 - Whitewood Estates Car 1&lt;br /&gt;
* 0x96B318 - Whitewood Estates Car 2&lt;br /&gt;
* 0x96B358 - Whitewood Estates Car 3&lt;br /&gt;
* 0x96B398 - Whitewood Estates Car 4&lt;br /&gt;
* 0x96B3D8 - Palomino Creek Car 1&lt;br /&gt;
* 0x96B418 - Palomino Creek Car 2&lt;br /&gt;
* 0x96B458 - Palomino Creek Car 3&lt;br /&gt;
* 0x96B498 - Palomino Creek Car 4&lt;br /&gt;
* 0x96B4D8 - Redlands West Car 1&lt;br /&gt;
* 0x96B518 - Redlands West Car 2&lt;br /&gt;
* 0x96B558 - Redlands West Car 3&lt;br /&gt;
* 0x96B598 - Redlands West Car 4&lt;br /&gt;
* 0x96B5D8 - El Corona Car 1&lt;br /&gt;
* 0x96B618 - El Corona Car 2&lt;br /&gt;
* 0x96B658 - El Corona Car 3&lt;br /&gt;
* 0x96B698 - El Corona Car 4&lt;br /&gt;
* 0x96B6D8 - MulHolland Car 1&lt;br /&gt;
* 0x96B718 - MulHolland Car 2&lt;br /&gt;
* 0x96B758 - MulHolland Car 3&lt;br /&gt;
* 0x96B798 - MulHolland Car 4&lt;br /&gt;
* 0x96B7D8 - LSPD Impound Car 1&lt;br /&gt;
* 0x96B818 - LSPD Impound Car 2&lt;br /&gt;
* 0x96B858 - LSPD Impound Car 3&lt;br /&gt;
* 0x96B898 - LSPD Impound unused&lt;br /&gt;
* 0x96B8D8 - SFPD Impound Car 1&lt;br /&gt;
* 0x96B918 - SFPD Impound Car 2&lt;br /&gt;
* 0x96B958 - SFPD Impound Car 3&lt;br /&gt;
* 0x96B998 - SFPD Impound unused&lt;br /&gt;
* 0x96B9D8 - LVPD Impound Car 1&lt;br /&gt;
* 0x96BA18 - LVPD Impound Car 2&lt;br /&gt;
* 0x96BA58 - LVPD Impound Car 3&lt;br /&gt;
* 0x96BA98 - LVPD Impound usued&lt;br /&gt;
* 0x96BAD8 - Calton Heights Car 1&lt;br /&gt;
* 0x96BB18 - Calton Heights Car 2&lt;br /&gt;
* 0x96BB58 - Calton Heights Car 3&lt;br /&gt;
* 0x96BB98 - Calton Heights Car 4&lt;br /&gt;
* 0x96BBD8 - Paradiso Car 1&lt;br /&gt;
* 0x96BC18 - Paradiso Car 2&lt;br /&gt;
* 0x96BC58 - Paradiso Car 3&lt;br /&gt;
* 0x96BC98 - Paradiso Car 4&lt;br /&gt;
* 0x96BCD8 - Doherty Car 1&lt;br /&gt;
* 0x96BD18 - Doherty Car 2&lt;br /&gt;
* 0x96BD58 - Doherty Car 3&lt;br /&gt;
* 0x96BD98 - Doherty Car 4&lt;br /&gt;
* 0x96BDD8 - Hashbury Car 1&lt;br /&gt;
* 0x96BE18 - Hashbury Car 2&lt;br /&gt;
* 0x96BE58 - Hashbury Car 3&lt;br /&gt;
* 0x96BE98 - Hashbury Car 4&lt;br /&gt;
* 0x96BED8 - Verdant Meadows Airport Car 1&lt;br /&gt;
* 0x96BF18 - Verdant Meadows Airport Car 2&lt;br /&gt;
* 0x96BF58 - Verdant Meadows Airport Car 3&lt;br /&gt;
* 0x96BF98 - Verdant Meadows Airport Car 4&lt;br /&gt;
&lt;br /&gt;
==Interface==&lt;br /&gt;
* 0xBAB22C - [byte] Health bar/red text/enemy marker/anything red color (RGBA, 4 bytes)&lt;br /&gt;
* 0xBAB230 - [byte] Money font color/vehicle entry name/green text/anything green color (RGBA, 4 bytes)&lt;br /&gt;
* 0xBAB238 - [byte] White text color (RGBA, 4 bytes)&lt;br /&gt;
* 0xBAB240 - [byte] Main menu title border (RGBA, 4 bytes)&lt;br /&gt;
* 0xBAB244 - [byte] Wanted level/yellow text color (RGBA, 4 bytes)&lt;br /&gt;
* 0xBAB24C - [byte] Radio station text color (RGBA, 4 bytes)&lt;br /&gt;
&lt;br /&gt;
==Menu==&lt;br /&gt;
The following addresses have been found:&lt;br /&gt;
&lt;br /&gt;
0xBA6748 - Base address.&lt;br /&gt;
&lt;br /&gt;
* +0x15D = [byte] Current Menu ID&lt;br /&gt;
* +0x78D = [byte] Show menu item hover&lt;br /&gt;
* +0x54 = [dword] Selected menu item&lt;br /&gt;
&lt;br /&gt;
* +0xE9 = [byte] Main menu switch (startup menu/menu when playing)&lt;br /&gt;
* +0x84 = [dword] Language&lt;br /&gt;
* +0x15F = [byte] Selected savegame&lt;br /&gt;
* +0x24 = [dword] Radar mode&lt;br /&gt;
&lt;br /&gt;
* +0x64 = [float] Map zoom&lt;br /&gt;
* +0x68 = [float] Map x position&lt;br /&gt;
* +0x6C = [float] Map y position&lt;br /&gt;
&lt;br /&gt;
* +0x5C = [byte] Player in menu?&lt;br /&gt;
&lt;br /&gt;
==Menu IDs==&lt;br /&gt;
Known Menu IDs (get ID at 0xBA68A5):&lt;br /&gt;
* 0 = Stats&lt;br /&gt;
* 1 = Start game&lt;br /&gt;
* 2 = Brief&lt;br /&gt;
* 3 = Audio options&lt;br /&gt;
* 4 = Display settings&lt;br /&gt;
* 5 = Map&lt;br /&gt;
* 6 = Question start new game&lt;br /&gt;
* 7 = Game selection&lt;br /&gt;
* 8 = Question load mission pack&lt;br /&gt;
* 9 = Load game&lt;br /&gt;
* 10 = Delete game&lt;br /&gt;
* 11 = Question load save game&lt;br /&gt;
* 12 = Question delete game&lt;br /&gt;
* 13 = Loads first savegame? *crash&lt;br /&gt;
* 14 = Delete successful&lt;br /&gt;
* 15 = Delete successful&lt;br /&gt;
* 16 = Save game&lt;br /&gt;
* 17 = Question save&lt;br /&gt;
* 18 = Save successful&lt;br /&gt;
* 19 = Save successful&lt;br /&gt;
* 20 = Save game ok&lt;br /&gt;
* 21 = Load game ok&lt;br /&gt;
* 22 = Game affected, do not save&lt;br /&gt;
* 23 = Display default settings&lt;br /&gt;
* 24 = Audio default settings&lt;br /&gt;
* 25 = Controller default settings&lt;br /&gt;
* 26 = User track options&lt;br /&gt;
* 28 = Language&lt;br /&gt;
* 29 = Save game ok&lt;br /&gt;
* 30 = Save unsuccessful&lt;br /&gt;
* 31 = Load game (save unsuccessful)&lt;br /&gt;
* 32 = Load unsuccessful, file corrupted&lt;br /&gt;
* 33 = Options&lt;br /&gt;
* 34 = Main menu&lt;br /&gt;
* 35 = Quit game&lt;br /&gt;
* 36 = Controller setup&lt;br /&gt;
* 37 = Redefine controls&lt;br /&gt;
* 38 = Foot/vehicle controls&lt;br /&gt;
* 39 = Mouse settings&lt;br /&gt;
* 40 = Joypad settings&lt;br /&gt;
* 41 = Game running main menu&lt;br /&gt;
* 42 = Quit game&lt;br /&gt;
* 43 = Empty&lt;br /&gt;
&lt;br /&gt;
== SCM related ==&lt;br /&gt;
* 0xA49960 - Start of the SCM block (0xA49960 + (4 * varnumber) is that particular variable)&lt;br /&gt;
* 0xA7A6A0 - Start of the mission block (69000 bytes)&lt;br /&gt;
* 0x464080 - GetOpcodeParameters()&lt;br /&gt;
* 0xA447F4 - Command count&lt;br /&gt;
* 00469F00 - CRunningScript_ProcessOneCommand&lt;br /&gt;
* 0x464080 - CRunningScript_CollectParameters&lt;br /&gt;
* 0x4859D0 - CRunningScript_UpdateCompareFlag&lt;br /&gt;
* 0x469390 - Game_Script_Thread struct&lt;br /&gt;
* 0xA43C78 - Where the routine above stores opcode parameters values. Max 16 paramters for an opcode it seems&lt;br /&gt;
* 0x8A6168 - &amp;quot;Master&amp;quot; jumptable, each dword points to one of 27 different functions, each one handling approx 100 opcodes&lt;br /&gt;
* 0x466C50 - Opcodes 0000 - 0063. Array of dword, each pointing to the function for that opcode&lt;br /&gt;
* 0x468364 - Opcodes 0064 - 00C4. Array of dword, each pointing to the function for that opcode&lt;br /&gt;
* 0x469E4C - Opcodes 00D6 - 0129. Array of byte, each byte is an index for the array of dword at 0x469DD4, which points to the opcode function&lt;br /&gt;
* 0x47D1B4 - Opcodes 0137 - 018F. Array of byte, each byte is an index for the array of dword at 0x47D0F4, which points to the opcode function&lt;br /&gt;
* 0x47DFE0 - Opcodes 0190 - 01F3. Array of byte, each byte is an index for the array of dword at 0x47DF58, which points to the opcode function&lt;br /&gt;
* 0x47F304 - Opcodes 01F4 - 0256. Array of byte, each byte is an index for the array of dword at 0x47F24C, which points to the opcode function&lt;br /&gt;
* 0x47FA04 - Opcodes 0292 - 02B8. Array of byte, each byte is an index for the array of dword at 0x47F9BC, which points to the opcode function&lt;br /&gt;
* 0x480FD8 - Opcodes 02BE - 031D. Array of byte, each byte is an index for the array of dword at 0x480F10, which points to the opcode function&lt;br /&gt;
* 0x4836B8 - Opcodes 0320 - 0382. Array of byte, each byte is an index for the array of dword at 0x483600, which points to the opcode function&lt;br /&gt;
(No time to finish now, will finish later)&lt;br /&gt;
&lt;br /&gt;
===Threads===&lt;br /&gt;
0xA8B430 - Start of the threads pool. There are two queues: the active threads and inactive ones.&amp;lt;br&amp;gt;&lt;br /&gt;
0xA8B42C - Pointer to the first active SCM thread.&amp;lt;br&amp;gt;&lt;br /&gt;
0xA8B428 - Pointer to the first inactive SCM thread.&lt;br /&gt;
&lt;br /&gt;
Each thread has size of 224 (0xE0) bytes. &lt;br /&gt;
&lt;br /&gt;
* +0 = [void*] Pointer to the next thread in a queue&lt;br /&gt;
* +4 = [void*] Pointer to the previous thread in a queue&lt;br /&gt;
* +8 = [char] Thread name given by the opcode [[03A4]], char 8&lt;br /&gt;
* +16 = [dword] Thread base IP (used in the missions and [[External_Script|external scripts]] to calculate a global address of a local jump offset)&lt;br /&gt;
* +20 = [dword] Current IP&lt;br /&gt;
* +24 = [dword] Return stack (stores the current IP when a gosub executed, dword 8)&lt;br /&gt;
* +56 = [word] Last item index of the return stack&lt;br /&gt;
* +60 = [dword] Local variables array, dword 32&lt;br /&gt;
* +188 = [dword] Automatically incrementing timers, dword 2&lt;br /&gt;
* +196 = [boolean] Thread active flag&lt;br /&gt;
* +197 = [boolean] IF result&lt;br /&gt;
* +198 = [boolean] Mission flag&lt;br /&gt;
* +199 = [boolean] External script flag&lt;br /&gt;
* +200 = [boolean] Unknown flag (in menu?). Used in [[03E5]]&lt;br /&gt;
* +201 = [boolean] Unknown flag (ID of an assigned script?)&lt;br /&gt;
* +204 = [dword] Wakeup time (set by [[0001]])&lt;br /&gt;
* +208 = [word] IF number (set by [[00D6]])&lt;br /&gt;
* +210 = [boolean] Not flag (if a condition to check is negative – any opcodes higher than 0x7FFF)&lt;br /&gt;
* +211 = [boolean] Wasted or busted check enabled flag (set by [[0111]]); '''only for missions'''&lt;br /&gt;
* +212 = [boolean] Player is wasted or busted flag; '''only for missions'''&lt;br /&gt;
* +216 = [dword] Skip scene IP (used by opcodes [[0707]], [[0701]])&lt;br /&gt;
* +220 = [boolean] Mission flag&lt;br /&gt;
&lt;br /&gt;
===External Scripts Info===&lt;br /&gt;
0xA47B60 – Start of the external scripts info pool. There are 82 elements with 32 bytes of size each&lt;br /&gt;
* +0 = [dword] Script IP&lt;br /&gt;
* +4 = [word] Status (can be obtained by [[0926]])&lt;br /&gt;
* +6 = [word] Index in SCM (a number as defined in the scm header)&lt;br /&gt;
* +8 = [char] Name, char 20&lt;br /&gt;
* +28 = [dword] Size&lt;br /&gt;
&lt;br /&gt;
0xA485A0 – [dword] Size of the largest external script&amp;lt;br&amp;gt;&lt;br /&gt;
0xA485A4 – [dword] Total scripts count&lt;br /&gt;
&lt;br /&gt;
===Misc===&lt;br /&gt;
0xA4892C – Start of the pool stored the flipped vehicles handles. There are 6 elements in there, with each of them:&lt;br /&gt;
* +0 = [dword] Vehicle handle to check if it flipped. Stored by opcode [[0190]].&lt;br /&gt;
* +4 = [dword] Time in ms passed from the moment a vehicle flipped. Used by opcode [[018F]]&lt;br /&gt;
&lt;br /&gt;
00A90850 – Start of the mission cleanup list. This list keeps the handles of any entities created during a mission. When the opcode [[00D8]] executed (normally it happens at the end of any mission), the game reads this list and destroys everything being stored there. Maximum of the items in the list is 75. Each item has the following structure:&lt;br /&gt;
* +0 = [byte] Entity type:&lt;br /&gt;
** 1 - vehicle&lt;br /&gt;
** 2 - actor&lt;br /&gt;
** 3 - object&lt;br /&gt;
** 4 - particle&lt;br /&gt;
** 5 – group ([[062F]])&lt;br /&gt;
** 7 – AS_origin ([[061D]])&lt;br /&gt;
** 8 - action_sequence&lt;br /&gt;
** 9 - decision maker&lt;br /&gt;
** 11 - searchlight&lt;br /&gt;
** 13 - txd_dictionary&lt;br /&gt;
* +4 = [dword] entity handle (an index in the proper pool)&lt;br /&gt;
&lt;br /&gt;
= Weather Codes=&lt;br /&gt;
0xC81318 - [word] Weather lock (by AlienX).&amp;lt;br&amp;gt;&lt;br /&gt;
0xC8131C - [word] Upcoming weather.&amp;lt;br&amp;gt;&lt;br /&gt;
0xC81320 - [word] Current weather.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The following values tie up with the sections in data/[[timecycp.dat]].  There are several different kinds of weathers (including underwater), and the current weather affects viewing distance, sky colour, fog intensity, and other things like that.  The appearance of each weather is time-dependent too.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Weather Values:&lt;br /&gt;
&lt;br /&gt;
* 0 = EXTRASUNNY_LA&lt;br /&gt;
* 1 = SUNNY_LA&lt;br /&gt;
* 2 = EXTRASUNNY_SMOG_LA&lt;br /&gt;
* 3 = SUNNY_SMOG_LA&lt;br /&gt;
* 4 = CLOUDY_LA&lt;br /&gt;
* 5 = SUNNY_SF&lt;br /&gt;
* 6 = EXTRASUNNY_SF&lt;br /&gt;
* 7 = CLOUDY_SF&lt;br /&gt;
* 8 = RAINY_SF&lt;br /&gt;
* 9 = FOGGY_SF&lt;br /&gt;
* 10 = SUNNY_VEGAS&lt;br /&gt;
* 11 = EXTRASUNNY_VEGAS (heat waves)&lt;br /&gt;
* 12 = CLOUDY_VEGAS&lt;br /&gt;
* 13 = EXTRASUNNY_COUNTRYSIDE&lt;br /&gt;
* 14 = SUNNY_COUNTRYSIDE&lt;br /&gt;
* 15 = CLOUDY_COUNTRYSIDE&lt;br /&gt;
* 16 = RAINY_COUNTRYSIDE&lt;br /&gt;
* 17 = EXTRASUNNY_DESERT&lt;br /&gt;
* 18 = SUNNY_DESERT&lt;br /&gt;
* 19 = SANDSTORM_DESERT&lt;br /&gt;
* 20 = UNDERWATER (greenish, foggy)&lt;br /&gt;
* 21 = EXTRACOLOURS_1 (very dark, gradiented skyline, purple) Used for interiors?&lt;br /&gt;
* 22 = EXTRACOLOURS_2 (very dark, gradiented skyline, green) Used for interiors?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; The following are not mentioned in that file, make of them what you will:&lt;br /&gt;
&lt;br /&gt;
* 23 to 26 = variations of pale orange&lt;br /&gt;
* 27 to 29 = variations of fresh blue&lt;br /&gt;
* 30 to 32 = variations of dark, cloudy, teal&lt;br /&gt;
* 33 = dark, cloudy, brown&lt;br /&gt;
* 34 = blue/purple, regular&lt;br /&gt;
* 35 = dull brown&lt;br /&gt;
* 36 to 38 = bright, foggy, orange&lt;br /&gt;
* 39 = extremely bright&lt;br /&gt;
* 40 to 42 = blue/purple cloudy&lt;br /&gt;
* 43 = dark toxic clouds&lt;br /&gt;
* 44 = black/white sky&lt;br /&gt;
* 45 = black/purple sky&lt;br /&gt;
&lt;br /&gt;
'''Warning: Setting these values to anything higher will result in things like black screen, flickering, really red, etc.'''&lt;br /&gt;
&lt;br /&gt;
= Dependencies=&lt;br /&gt;
* Car ptr = player ptr when on foot. &lt;br /&gt;
['''Note''': This depends on which address for the pointer is being used, if the car pointer appears to be the same as the player pointer on foot, then you may be using a camera-related target pointer.]&lt;br /&gt;
* CPed block size = 0x7C4 bytes.&lt;br /&gt;
* CVehicle block size = 0x0A18 bytes.&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
* [http://www.gtaforums.com/index.php?showtopic=194199 GTASA Memory Addresses] - a topic on GTAForums.&lt;br /&gt;
&lt;br /&gt;
[[Category:Memory Addresses]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Item_Placement&amp;diff=3001</id>
		<title>Item Placement</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Item_Placement&amp;diff=3001"/>
		<updated>2008-08-15T08:43:19Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* ENEX */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''I'''tem '''PL'''acement files are map files used to place objects into the GTA world, as well as define zones, paths, garages, interior portals, and a lot more. IPL files can easily be opened using any text-editing program like Notepad.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
The &amp;lt;code&amp;gt;.ipl&amp;lt;/code&amp;gt; files are split up into many sections. Not all of them have to be used, leaving them empty works as well. Each section starts with a section identifier and ends with the keyword &amp;quot;end&amp;quot;, both in a separate line.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 inst&lt;br /&gt;
 ...&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
===INST===&lt;br /&gt;
Locations and properties for instances of static and dynamic ([[object.dat]]) map objects.&lt;br /&gt;
&lt;br /&gt;
'''GTA3 format:'''&lt;br /&gt;
 id, name, x, y, z, sx, sy, sz, rx, ry, rz, rw&lt;br /&gt;
&lt;br /&gt;
'''GTAVC format:'''&lt;br /&gt;
 id, name, int, x, y, z, sx, sy, sz, rx, ry, rz, rw&lt;br /&gt;
&lt;br /&gt;
'''GTASA format:'''&lt;br /&gt;
 id, name, int, x, y, z, rx, ry, rz, rw, lod&lt;br /&gt;
&lt;br /&gt;
;ID: Unique object identifier. Must match in [[IDE]] file identifier. (integer)&lt;br /&gt;
;Name: Usually same as the &amp;lt;code&amp;gt;.dff&amp;lt;/code&amp;gt; [[model file]], without extension. (string)&lt;br /&gt;
;int: [[Interior#List|Interior number]]; zero for outside. (integer)&lt;br /&gt;
;x, y, z: Item placement coordinates. (floating point numbers)&lt;br /&gt;
;sx, sy, sz: Item scale, scales visible model only, doesn't scale the [[collision model]]. (floating point numbers)&lt;br /&gt;
;rx, ry, rz, rw: Item rotations.  Defined as [[Wikipedia:quaternion|quaternion]], quite sophisticated math is needed to translate it to [[Wikipedia:Euler angles|Euler angles]]. A map editing program should be used to edit these.&lt;br /&gt;
;lod: San Andreas only.  This is the line number in the current IPL file for the [[LOD]] which belongs to this object.  The first item in IPL file is line number 0, second is number 1 and so on.  A value of -1 means no LOD is used. (integer)&lt;br /&gt;
&lt;br /&gt;
===CULL===&lt;br /&gt;
This creates rainfree zones, wastefree zones, map reflections, TV screens, and temporary fixed camera positions.&amp;lt;br&amp;gt;&lt;br /&gt;
''GTA3 and VC format:''&lt;br /&gt;
 x1, y1, z1, x2, y2, z2, x3, y3, z3, flag, 0&lt;br /&gt;
;x2, y2, z2: lower-left corner of the areabox&lt;br /&gt;
;x3, y3, z3: upper-right corner of the areabox&lt;br /&gt;
''SA format 1:''&lt;br /&gt;
 centerX, centerY, centerZ, 0 (some kind of rotation), Ywidth, bottomZ, Xwidth, 0 (some kind of rotation), topZ, Flag, Flag 2&lt;br /&gt;
''SA format 2:''&lt;br /&gt;
 centerX, centerY, centerZ, 0 (some kind of rotation), Ywidth, bottomZ, Xwidth, 0 (some kind of rotation), topZ, Flag, Vx, Vy, Vz, Cm&lt;br /&gt;
Cull zone boundaries in San Andreas are aligned to the nearest world unit.&amp;lt;br&amp;gt;&lt;br /&gt;
Flags:&amp;lt;br&amp;gt;&lt;br /&gt;
1 Camera close in into player using closest third-person view camera mode, does not close in if in first person or cinematic mode, camera mode cannot be changed while in the zone&amp;lt;br&amp;gt;&lt;br /&gt;
2 camera remotely placed outside the zone, no control of camera, camera mode cannot be changed while in the zone&amp;lt;br&amp;gt;&lt;br /&gt;
4 Unknown&amp;lt;br&amp;gt;&lt;br /&gt;
8 Rain-free, police helicopter-free zone&amp;lt;br&amp;gt;&lt;br /&gt;
4096 5-star military zone&lt;br /&gt;
&lt;br /&gt;
===PATH===&lt;br /&gt;
'''Ped, Car and Boat Paths''', defines paths relative to the world centre. Only used in GTA VC, this format is much easier than in GTA3 where the paths were stored in IDE files, and GTA-SA paths which are stored in **nodes.dat inside gta3.img.  This is a quite complicated format and hardly usable without an editing program (such as [[Ked]]).&lt;br /&gt;
&lt;br /&gt;
GTA SA uses [[GTA SA Paths|compiled binary files]] for its paths.&lt;br /&gt;
&lt;br /&gt;
===GRGE===&lt;br /&gt;
This creates [[Garage|garages]] for the main.scm to use. Only used in San Andreas.&amp;lt;br&amp;gt;&lt;br /&gt;
''SA only:''&lt;br /&gt;
 X1, Y1, Z1, frontX, frontY, X2, Y2, Z2, Door, Type, Name&lt;br /&gt;
;X1, Y1, Z1: Lower left front&lt;br /&gt;
;frontX, frontY: Lower right front&lt;br /&gt;
;X2, Y2, Z2: Upper left rear&lt;br /&gt;
;Door: [[Garage#Grge Door Types|Type of door]]&lt;br /&gt;
;Type: [[Garage#San_Andreas|Type of garage]]&lt;br /&gt;
;Name: [[Garage#San_Andreas_2|Used to edit garage through the SCM]]&lt;br /&gt;
&lt;br /&gt;
===ENEX===&lt;br /&gt;
This creates entrances to exits or [[interior]] connections to real world by placing yellow markers on the map for CJ to walk through. Note that changes to the flags and links of existing markers are not updated by the text files after the save is created so maintaining the proper sequence of enex lines is a primary concern. New connections can be added to an existing save if temporary (burglary) connections are not present in the save data. Indoor saves generally have no temporary enex data. Add the markers at the very end of the &amp;lt;code&amp;gt;[[gta.dat]]&amp;lt;/code&amp;gt; else it can negatively affect currently placed markers. 376 of 400 possible enex connections are used in a standard game.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''SA only:''&lt;br /&gt;
 X1, Y1, Z1, ROT, W1, W2, C8, X2, Y2, Z2, Rot2, Int, Flag, Name, Sky, I2, Time On, Time Off&lt;br /&gt;
;X1, Y1, Z1: entrance location &lt;br /&gt;
;ROT: ???&lt;br /&gt;
;W1: X width of entry&lt;br /&gt;
;W2: Y width of entry&lt;br /&gt;
;C8: constant 8&lt;br /&gt;
;X2, Y2, Z2: exit location &lt;br /&gt;
;Rot2: exit rotation in degrees&lt;br /&gt;
;Int: The target interior number&lt;br /&gt;
;Flag: The type of marker&lt;br /&gt;
;Name: [[Interior#San_Andreas_2|Interior name]], used to find the counterpart and to identify via mission script&lt;br /&gt;
;Sky: Sky color changer&lt;br /&gt;
;I2: unknown integer flags, could be weather related&lt;br /&gt;
;Time On: enables the marker at this time&lt;br /&gt;
;Time Off: disables the marker at this time&lt;br /&gt;
&lt;br /&gt;
====Enex Flags====&lt;br /&gt;
{|&lt;br /&gt;
! Flag&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| unknown interior&lt;br /&gt;
| Only used for interior markers&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| unknown pairing&lt;br /&gt;
| Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Create linked pair&lt;br /&gt;
| Pair with unflagged mate during new game start&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Reward interior&lt;br /&gt;
| Sets flag 0010 on pair mate when used&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Used reward entrance&lt;br /&gt;
| Set by accessing reward interior&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Cars and aircraft&lt;br /&gt;
| Enable for cars and aircraft&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| Bikes and motorcycles&lt;br /&gt;
| Enable for bikes and motorcycles&lt;br /&gt;
|-&lt;br /&gt;
| 128&lt;br /&gt;
| Disable on foot&lt;br /&gt;
| No foot traffic. Use for cars and/or bikes only&lt;br /&gt;
|-&lt;br /&gt;
| 256&lt;br /&gt;
| Accept NPC group&lt;br /&gt;
| Group members accepted at destination of pair (passengers stripped)&lt;br /&gt;
|-&lt;br /&gt;
| 512&lt;br /&gt;
| Food date flag&lt;br /&gt;
| Set and cleared by food date (cut-scene related)&lt;br /&gt;
|-&lt;br /&gt;
| 1024&lt;br /&gt;
| unknown burglary&lt;br /&gt;
| Set on Bayside and Temporary Burglary doors&lt;br /&gt;
|-&lt;br /&gt;
| 2048&lt;br /&gt;
| Disable exit&lt;br /&gt;
| Player can enter but cannot exit a two-way pair&lt;br /&gt;
|-&lt;br /&gt;
| 4096&lt;br /&gt;
| Burglary access&lt;br /&gt;
| Enabled and disabled during Burglary&lt;br /&gt;
|-&lt;br /&gt;
| 8192&lt;br /&gt;
| Entered without exit&lt;br /&gt;
| Set by Entrance, Cleared by Exit; Applies to one side of a two&lt;br /&gt;
|-&lt;br /&gt;
| 16384&lt;br /&gt;
| Enable access&lt;br /&gt;
| Enabled by default; often cleared by scripts&lt;br /&gt;
|-&lt;br /&gt;
| 32768&lt;br /&gt;
| Delete enex&lt;br /&gt;
| Enex is deleted when used&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Enex Sky Colors====&lt;br /&gt;
{|&lt;br /&gt;
! Sky Color&lt;br /&gt;
! Descriptions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| blue sky&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| white fading to black&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Black with yellow lights.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| same as 1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| same as 2&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| white fading to purple fading to black with yellow lights&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| white fading to black with yellow lights.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| white fading to green fading to black with yellow light (probably clouds)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| same as 2&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Purple (gay) retarded shadows not much sight.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| same as 7 only green is ocean blue&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| same as 6&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| same as 2.....&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Nightly Mist&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| Blue fading yellow (sunrise i think)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Blue air with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| darker blue air with lightblue clouds&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Darker Blue air with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Orange with white clouds&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Orange fading gray with orange clouds (weird)&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| this is red fading PURPLE with no seeing rang that you can't even see yourself&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| Dark Purple to grey with nice sun reflection&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| same as 19&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| the best one: big sun white clouds and blue air&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Blue air white clouds HUGE SUN&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Orange with dark orange clouds&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===PICK===&lt;br /&gt;
This creates permanent [[weapon]] pickups. Rockstar only used this to create fire extinguisher pickups at fast food restaurants.&amp;lt;br&amp;gt;&lt;br /&gt;
''SA only:''&lt;br /&gt;
 Weapon ID, X, Y, Z&lt;br /&gt;
&lt;br /&gt;
====Pick Weapon IDs====&lt;br /&gt;
{|&lt;br /&gt;
! ID&lt;br /&gt;
! Weapon Name&lt;br /&gt;
! Ammo&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Brass Knuckles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Nightstick&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Knife&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Golf Club&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Bat&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Shovel&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Pool Cue&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Katana&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Chainsaw&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Molotov&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Grenades&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Satchels&lt;br /&gt;
| 5&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| 9mm Pistol&lt;br /&gt;
| 30&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Silenced 9mm&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Desert Eagle&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Shotgun&lt;br /&gt;
| 15&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| SPAS Shotgun&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Tec 9&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Micro SMG&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| MP5&lt;br /&gt;
| 60&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| AK47&lt;br /&gt;
| 80&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| M4&lt;br /&gt;
| 80&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Country Rifle&lt;br /&gt;
| 20&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Sniper Rifle&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Flamethrower&lt;br /&gt;
| 100&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Minigun&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 33&lt;br /&gt;
| Large Purple Dildo&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Small White Dildo&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 35&lt;br /&gt;
| Large White Vibrator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Small Black Vibrator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Flowers&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 38&lt;br /&gt;
| Cane&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Ringbox&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 40&lt;br /&gt;
| Necklace Box&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| Cellphone&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| *Nothing*&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 43&lt;br /&gt;
| Teargas&lt;br /&gt;
| 8&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| Minigun (Duplicate)&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 45&lt;br /&gt;
| SPAS Shotgun (Duplicate)&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
| 46&lt;br /&gt;
| Rocket Launcher&lt;br /&gt;
| 4&lt;br /&gt;
|-&lt;br /&gt;
| 47&lt;br /&gt;
| Heat Seeking Rocket Launcher&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| Detonator&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 49&lt;br /&gt;
| Spray can&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| Fire Extinguisher&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| 51&lt;br /&gt;
| Camera&lt;br /&gt;
| 36&lt;br /&gt;
|-&lt;br /&gt;
| 52&lt;br /&gt;
| Nightvision Goggles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| Infrared Goggles&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Jetpack&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| Parachute&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===JUMP===&lt;br /&gt;
Creates a Unique Stunt Jump based on the minimum and maximum coordinates for the starting and landing zones. This format conforms with the encoding provided by opcode [[0814]].&amp;lt;br&amp;gt;&lt;br /&gt;
''SA only:''&lt;br /&gt;
 startXmin, startYmin, startZmin, startXmax, startYmax, startZmax, landXmin, landYmin, landZmin, &lt;br /&gt;
 landXmax, landYmax, landZmax, camX, camY, camZ, reward&lt;br /&gt;
&lt;br /&gt;
===TCYC===&lt;br /&gt;
Creates black sky if you enter the zone. Also exists for all towns in countryside. Probably custom weather?&amp;lt;br&amp;gt;&lt;br /&gt;
''SA only:''&lt;br /&gt;
 X1, Y1, Z1, X2, Y2, Z2, ?, ?, ?, ?, ?&lt;br /&gt;
&lt;br /&gt;
===AUZO===&lt;br /&gt;
This creates an audio if you enter the zone.&amp;lt;br&amp;gt;&lt;br /&gt;
''SA Type 1:''&lt;br /&gt;
 Name, ID, Switch, X1, Y1, Z1, X2, Y2, Z2&lt;br /&gt;
;Name: Name of the zone&lt;br /&gt;
;ID: Sound played in this zone&lt;br /&gt;
;Switch: Makes it always on or always off. Can be forced using the main.scm using opcode [[0917]]&amp;lt;br&amp;gt;&lt;br /&gt;
''SA Type 2:''&lt;br /&gt;
 Name, ID, Switch, X, Y, Z, Volume&lt;br /&gt;
;Name: Name of the zone&lt;br /&gt;
;ID: Sound played in this zone&lt;br /&gt;
;Switch: Makes it always on or always off. Can be forced using the main.scm using opcode [[0917]]&lt;br /&gt;
;Volume: The distance the sound will be heard&lt;br /&gt;
&lt;br /&gt;
====Auzo Audio IDs====&lt;br /&gt;
{|&lt;br /&gt;
! ID&lt;br /&gt;
! What sound it plays&lt;br /&gt;
! Description of sound in the unmodified audio streams&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Ambience track 9&lt;br /&gt;
| St Mark's violin music&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Ambience track 6&lt;br /&gt;
| Beach party bkgd song&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Ambience track 31&lt;br /&gt;
| Unused loud hum&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Ambience track 5&lt;br /&gt;
| Awards ceremony music&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Ambience track 34&lt;br /&gt;
| Loud hum heard on ships&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Ambience track 23&lt;br /&gt;
| Low Rider Challenge bkgd song&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Ambience track 30&lt;br /&gt;
| Static sound heard on military bases&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| Ambience track 12&lt;br /&gt;
| Casino bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Ambience track 4&lt;br /&gt;
| Quiet hum heard in Area 69&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| Ambience track 2&lt;br /&gt;
| Fan-like clicking heard in Abattoir&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Ambience track 1&lt;br /&gt;
| Quiet hum heard in 24-7s&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| Ambience track 14&lt;br /&gt;
| Loud hum heard in Dam interior&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| Ambience track 25&lt;br /&gt;
| Racing sounds heard in ITB lobby&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| Ambience track 24&lt;br /&gt;
| Quiet hum heard in Planning Dept&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| Ambience track 20&lt;br /&gt;
| Quiet hum heard in safe houses&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| Ambience track 13&lt;br /&gt;
| Dance Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| Ambience track 13&lt;br /&gt;
| Dance Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Favorite Radio Station&lt;br /&gt;
| Stream or User Tracks Player&lt;br /&gt;
|-&lt;br /&gt;
| 34&lt;br /&gt;
| Ambience track 28&lt;br /&gt;
| Pleasure Domes bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 36&lt;br /&gt;
| Ambience track 21&lt;br /&gt;
| Loud hum heard in Jet interior&lt;br /&gt;
|-&lt;br /&gt;
| 37&lt;br /&gt;
| Ambience track 10&lt;br /&gt;
| Muzak-type bkgd heard in unused diner interiors&lt;br /&gt;
|-&lt;br /&gt;
| 39&lt;br /&gt;
| Ambience track 29&lt;br /&gt;
| Quiet hum heard in police stations&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| Ambience track 35&lt;br /&gt;
| Stadium event bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 44&lt;br /&gt;
| Ambience track 18&lt;br /&gt;
| Fast Food Joint bkgd sounds&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| Ambience track 3&lt;br /&gt;
| Ammunation PA loop&lt;br /&gt;
|-&lt;br /&gt;
| 50&lt;br /&gt;
| Ambience track 39&lt;br /&gt;
| Quiet hum heard in warehouses&lt;br /&gt;
|-&lt;br /&gt;
| 51&lt;br /&gt;
| Ambience track 22&lt;br /&gt;
| Very loud hum heard in cargo plane?&lt;br /&gt;
|-&lt;br /&gt;
| 52&lt;br /&gt;
| Radio stream CH&lt;br /&gt;
| Playback FM&lt;br /&gt;
|-&lt;br /&gt;
| 53&lt;br /&gt;
| Radio stream CO&lt;br /&gt;
| K-ROSE&lt;br /&gt;
|-&lt;br /&gt;
| 54&lt;br /&gt;
| Radio stream CR&lt;br /&gt;
| KDST&lt;br /&gt;
|-&lt;br /&gt;
| 55&lt;br /&gt;
| Radio stream DS&lt;br /&gt;
| Bounce FM&lt;br /&gt;
|-&lt;br /&gt;
| 56&lt;br /&gt;
| Radio stream HC&lt;br /&gt;
| SFUR&lt;br /&gt;
|-&lt;br /&gt;
| 57&lt;br /&gt;
| Radio stream MH&lt;br /&gt;
| Radio Los Santos&lt;br /&gt;
|-&lt;br /&gt;
| 58&lt;br /&gt;
| Radio stream MR&lt;br /&gt;
| Radio X&lt;br /&gt;
|-&lt;br /&gt;
| 59&lt;br /&gt;
| Radio stream NJ&lt;br /&gt;
| CSR&lt;br /&gt;
|-&lt;br /&gt;
| 60&lt;br /&gt;
| Radio stream RE&lt;br /&gt;
| K-JAH West&lt;br /&gt;
|-&lt;br /&gt;
| 61&lt;br /&gt;
| Radio stream RG&lt;br /&gt;
| MasterSounds&lt;br /&gt;
|-&lt;br /&gt;
| 62&lt;br /&gt;
| Radio stream TK&lt;br /&gt;
| WCTR&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| Ambience track 17&lt;br /&gt;
| Unused quiet hum&lt;br /&gt;
|-&lt;br /&gt;
| 66&lt;br /&gt;
| Ambience track 36&lt;br /&gt;
| Strip Club bkgd medley&lt;br /&gt;
|-&lt;br /&gt;
| 67&lt;br /&gt;
| Ambience track 37&lt;br /&gt;
| Unused bkgd medley&lt;br /&gt;
|}&lt;br /&gt;
Notes: Any ID value from 0-70 inclusive not listed above generated no background sound.&amp;lt;br&amp;gt;&lt;br /&gt;
Audio 4 type two only&amp;lt;br&amp;gt;&lt;br /&gt;
Audios 5, 10, 12, and 13 disabled by default, can be re-enabled&lt;br /&gt;
&lt;br /&gt;
===MULT===&lt;br /&gt;
San Andreas only, this was never used in the game. This section is currently unknown and may never be known; it is ignored by the game.&lt;br /&gt;
&lt;br /&gt;
===CARS===&lt;br /&gt;
Only used in San Andreas, this creates permanent parked vehicles around the state. This section is similar to the opcode [[014B]], the only difference to the opcode is that an IPL-Spawned car got an check if another car is already parked in an specific radius at this position. Rockstar used it only in binary IPLs but it can also be used in regular IPLs.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''SA only:''&lt;br /&gt;
 X, Y, Z, angle, car id, primary color, secondary color, force_spawn, &lt;br /&gt;
 alarm_probability, door_lock_probability, unknown (word), unknown (word)&lt;br /&gt;
&lt;br /&gt;
Angle is in radian units: degrees/~57.2958&amp;lt;br&amp;gt;&lt;br /&gt;
Car ID can be random: -1&amp;lt;br&amp;gt;&lt;br /&gt;
Vehicles spawn more reliably if force_spawn is true: 1&lt;br /&gt;
&lt;br /&gt;
===OCCL===&lt;br /&gt;
This creates [[occlusion]] boxes around Vice City and San Andreas.&amp;lt;br&amp;gt;&lt;br /&gt;
''VC and SA only:''&lt;br /&gt;
 direct mid x, direct mid y, bottom height z, width x, width y, height from bottom height to top, &lt;br /&gt;
 rotation&lt;br /&gt;
&lt;br /&gt;
===ZONE===&lt;br /&gt;
Although technically an IPL section, this is usually only used in [[zone]] files (extension &amp;lt;code&amp;gt;.zon&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
==Useful Tools==&lt;br /&gt;
* [http://www.gtaforums.com/index.php?showtopic=315944 IPL Helper] - by Xmen&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
* [http://www.gtaforums.com/index.php?showtopic=202532 GTA SA IPL Documentation] - Topic by spaceeinstein covering details of the IPL format in GTA SA.&lt;br /&gt;
* [http://www.gtaforums.com/index.php?showtopic=188549&amp;amp;view=findpost&amp;amp;p=3177288 Explanation of GTA SA LOD System] - GTA Forums message by Steve-M, explaining the [[LOD]] system for IPL files in GTA SA.&lt;br /&gt;
* [http://projectcerbera.com/tutorials/vc_paths-definition.html Explantation of the path-section in a VC IPL] - by Cerbera&lt;br /&gt;
* [http://www.gtaforums.com/index.php?showtopic=331835 Enex Documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:Map Formats]][[Category:GTA 3]][[Category:GTA VC]][[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=3309</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=3309"/>
		<updated>2008-08-15T07:23:45Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 25: ENEX Connections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00    dword        Number of Players&lt;br /&gt;
 0x04    Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00    dword        Number of Objects&lt;br /&gt;
 0x04    Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          unknown (timer?)&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             IPL stream of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
New enex connections can be added to the save after the save is created if temporary (burglary) connections are not present (indoor or isolated saves). The flags and links for existing connections will not be updated by changes in the IPL file. If the enex structure is removed from the block (except for the -1 terminator) the game will remap all connections based on the current IPL configuration.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://en.wikipedia.org/wiki/010_Editor 010 Editor], by [[User:Seemann|Seemann]]: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v2.8 by Paul Breeuwsma: http://www.paulinternet.nl/#sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1963</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1963"/>
		<updated>2008-08-15T06:58:29Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 25: ENEX Connections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00    dword        Number of Players&lt;br /&gt;
 0x04    Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00    dword        Number of Objects&lt;br /&gt;
 0x04    Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          unknown (timer?)&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             IPL stream of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path. The enex path is used to display the zone name for the destination before CJ arrives in the zone.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://en.wikipedia.org/wiki/010_Editor 010 Editor], by [[User:Seemann|Seemann]]: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v2.8 by Paul Breeuwsma: http://www.paulinternet.nl/#sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1962</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1962"/>
		<updated>2008-08-08T18:52:36Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 25: ENEX Connections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0x22 0xCC 0x31 0x5D -- Version 2.00 (German)&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 16.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3A  byte[2]                   (Align)&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00    dword        Number of Players&lt;br /&gt;
 0x04    Player[]     Player structures -- each is 0x224 bytes in size; see details below&lt;br /&gt;
 0x00    dword        Number of Objects&lt;br /&gt;
 0x04    Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte       unknown&lt;br /&gt;
   0x0193  byte       (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0230  dword      (Align)&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48 (size of the following data)&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    dword          pointer to CObject&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          unknown (timer?)&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           index&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           flags&lt;br /&gt;
   0x1E    byte[2]        (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  byte          icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             number of cars to generate (101 or higher means unlimited generation)&lt;br /&gt;
   0x1E    byte             IPL stream of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             allocation flag (when game adds a new parked car it searches for the allocation = 0; &lt;br /&gt;
                            then sets it to 1 and never set back to 0).&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags (count)&lt;br /&gt;
 0x04      byte[count]     tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4    word[count]     source index of enex path (unused)&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source index (break loop if value = -1)&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination index&lt;br /&gt;
 ----&lt;br /&gt;
Enex Path: Normally 0 for outdoor saves, or 1 with the source index of the enex used to access the interior where the game was saved. The enex path may be longer on modified saves. Additional links are appended to the path.&lt;br /&gt;
&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair (strips passengers)&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Available tools for editing of the save file content:&lt;br /&gt;
* GTA:SA Save Template for [http://en.wikipedia.org/wiki/010_Editor 010 Editor], by [[User:Seemann|Seemann]]: http://sannybuilder.com/dev/SaveTool.rar&lt;br /&gt;
Allows editing of any save data directly in the hex editor. Also contains the script to recalculate the checksum.&lt;br /&gt;
* GTA SA Savegame Editor v2.8 by Paul Breeuwsma: http://www.paulinternet.nl/#sa&lt;br /&gt;
* GTA:SA Save Game Editor v1.0 by Ryosuke: http://gtasamod.web.fc2.com/tool/sase/index.html&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1670</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1670"/>
		<updated>2008-05-27T18:09:41Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 12: Car Generators */ found some details in memory dumps from PS2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0x10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses     Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword          Relative IP&lt;br /&gt;
   0x04  dword[8]       Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE         DESCRIPTION&lt;br /&gt;
 0x00    dword        Number of Players&lt;br /&gt;
 0x04    Player[]     Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x00    dword        Number of Objects&lt;br /&gt;
 0x04    Object[]     Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    (Align)&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0C  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  byte[2]       (Align?)&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           Number of Block4Struct structures&lt;br /&gt;
 0x04    byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x05    byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x06    byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x07    dword           unknown Wasted_Busted time&lt;br /&gt;
 0x0B    Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
   0x00  byte[12]        (unknown)&lt;br /&gt;
   0x0C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0x00    float          current asset value&lt;br /&gt;
   0x04    ----           unknown&lt;br /&gt;
   0x08    dword          ammo (or max asset value)&lt;br /&gt;
   0x0C    dword          unknown (timer?)&lt;br /&gt;
   0x10    word[3]        x,y,z, all multiplied by 8&lt;br /&gt;
   0x16    word           asset rate&lt;br /&gt;
   0x18    word           model&lt;br /&gt;
   0x1A    word           unknown (handle?)&lt;br /&gt;
   0x1C    byte           type&lt;br /&gt;
   0x1D    byte           unknown (flags?)&lt;br /&gt;
   0x1E    byte           (Align?)&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
* When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x00    word          Wasted structures number&lt;br /&gt;
 0x02    Restart[]     Wasted structures&lt;br /&gt;
 0x00    word          Busted structures number&lt;br /&gt;
 0x02    Restart[]     Busted structures&lt;br /&gt;
 0x00    byte          (Unknown)&lt;br /&gt;
 0x01    byte[12]      (Unknown)&lt;br /&gt;
 0x0D    byte          (Unknown)&lt;br /&gt;
 0x0E    byte          (Unknown)&lt;br /&gt;
 0x0F    byte[12]      (Unknown)&lt;br /&gt;
 0x1B    dword         (Unknown)&lt;br /&gt;
 0x1F    dword         (Unknown)&lt;br /&gt;
 0x23    byte[12]      (Unknown)&lt;br /&gt;
 0x2F    dword         (Unknown)&lt;br /&gt;
 0x33    dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x00  float[3]      coords&lt;br /&gt;
   0x0C  float         heading&lt;br /&gt;
   0x10  dword         town (island)&lt;br /&gt;
   0x14  end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x00  dword         color&lt;br /&gt;
   0x04  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x08  float[3]      position X,Y,Z&lt;br /&gt;
   0x14  word          index?&lt;br /&gt;
   0x16  byte[2]       (Align)&lt;br /&gt;
   0x18  float         sphere radius&lt;br /&gt;
   0x1C  word          icon size&lt;br /&gt;
   0x1E  byte[2]       (Align)&lt;br /&gt;
   0x20  dword         (unknown)&lt;br /&gt;
   0x24  dword         Icon ID&lt;br /&gt;
   0x25  byte[2]       unknown flags&lt;br /&gt;
   0x27  byte          (Align)&lt;br /&gt;
   0x28  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00A0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0C  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte                unknown counter (0..3)&lt;br /&gt;
 0x05    byte                unknown counter (0..20); when it's non-zero, the game doesn't check the timer (0x16)&lt;br /&gt;
 0x06    CarGen[count]       see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
 CarGen structure:&lt;br /&gt;
   0x00    word             index (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             cars to generate&lt;br /&gt;
   0x1E    byte             IPL stream of binary generators (non-zero records are not saved)&lt;br /&gt;
   0x1F    byte             unknown flag (usually 01, 00 are not saved)&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle (index)&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
 0x0000   float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 0x0148   dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 0x04C4   dword[32]&lt;br /&gt;
 0x0544   char[8]         last mission passed (gxt key)&lt;br /&gt;
 0x054C   byte[56]&lt;br /&gt;
 0x0584   dword[100]&lt;br /&gt;
 0x0714   byte[128]&lt;br /&gt;
 0x0794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x00  dword                police trigger last activation time&lt;br /&gt;
   0x04  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x08  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x10  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x14  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x18  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x1C  byte                 police trigger type; see details below&lt;br /&gt;
   0x1D  byte[3]              (Align)&lt;br /&gt;
   0x20                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused) (ignore?)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
 0x00      dword           total number of the tags &lt;br /&gt;
 0x04      byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 0x0000    dword           constant 256&lt;br /&gt;
 0x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 0x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
   0x000   byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
   0x014   dword[8]        (Unknown)&lt;br /&gt;
   0x034   dword[40]       (Unknown)&lt;br /&gt;
   0x0D4   dword[15]       (Unknown)&lt;br /&gt;
   0x110   (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1664</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1664"/>
		<updated>2008-05-25T20:29:19Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 12: Car Generators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  (align) ?&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
 0x00    float           current asset value&lt;br /&gt;
 0x04    ----            unknown&lt;br /&gt;
 0x08    dword           ammo (or max asset value)&lt;br /&gt;
 0x0C    dword           unknown (timer?)&lt;br /&gt;
 0x10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x16    word            asset rate&lt;br /&gt;
 0x18    word            model&lt;br /&gt;
 0x1A    word            unknown (handle?)&lt;br /&gt;
 0x1C    byte            type&lt;br /&gt;
 0x1D    byte            unknown (flags?)&lt;br /&gt;
 0x1E    (Allign) ?&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword               count&lt;br /&gt;
 0x04    byte[4]             unknown (align?)&lt;br /&gt;
 0x06    cargenstruct[count] see details below&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword               num entries used&lt;br /&gt;
 0x04    Numplate[15]        number plates&lt;br /&gt;
 0xf4                        end&lt;br /&gt;
&lt;br /&gt;
   Car generator structure:&lt;br /&gt;
   0x00    word             handle (0..499)&lt;br /&gt;
   0x02    word             model&lt;br /&gt;
   0x04    byte[2]          colors&lt;br /&gt;
   0x06    word[3]          x,y,z, all multiplied by 8&lt;br /&gt;
   0x0C    byte             heading/360*256&lt;br /&gt;
   0x0D    byte             alarm chance&lt;br /&gt;
   0x0E    byte             locked chance&lt;br /&gt;
   0x0F    byte             flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
   0x10    word             unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
   0x12    word             monetary value (unused?)&lt;br /&gt;
   0x14    bytes[2]         unknown (align?)&lt;br /&gt;
   0x16    dword            timer&lt;br /&gt;
   0x1A    word             unknown activity&lt;br /&gt;
   0x1C    word             cars to generate&lt;br /&gt;
   0x1E    byte[2]          unknown control (flags?)&lt;br /&gt;
   0x20    byte[2]          unknown (align?)&lt;br /&gt;
   0x22                     end&lt;br /&gt;
&lt;br /&gt;
   Numplate structure:&lt;br /&gt;
   0x00    dword            car generator handle&lt;br /&gt;
   0x04    char[8]          numberplate string&lt;br /&gt;
   0x0C    byte[4]          unknown (align?)&lt;br /&gt;
   0x10                     end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           constant 256&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1663</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1663"/>
		<updated>2008-05-25T20:21:47Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 12: Car Generators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  (align) ?&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
 0x00    float           current asset value&lt;br /&gt;
 0x04    ----            unknown&lt;br /&gt;
 0x08    dword           ammo (or max asset value)&lt;br /&gt;
 0x0C    dword           unknown (timer?)&lt;br /&gt;
 0x10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x16    word            asset rate&lt;br /&gt;
 0x18    word            model&lt;br /&gt;
 0x1A    word            unknown (handle?)&lt;br /&gt;
 0x1C    byte            type&lt;br /&gt;
 0x1D    byte            unknown (flags?)&lt;br /&gt;
 0x1E    (Allign) ?&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword           count&lt;br /&gt;
 0x04   (align) ?  &lt;br /&gt;
 0x06                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword           num entries used&lt;br /&gt;
 0x04    Numplate[15]    number plates&lt;br /&gt;
 0xf4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
 0x00    word            handle (0..499)&lt;br /&gt;
 0x02    word            model&lt;br /&gt;
 0x04    byte[2]         colors&lt;br /&gt;
 0x06    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x0C    byte            heading/360*256&lt;br /&gt;
 0x0D    byte            alarm chance&lt;br /&gt;
 0x0E    byte            locked chance&lt;br /&gt;
 0x0F    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
 0x10    word            unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
 0x12    word            monetary value (unused?)&lt;br /&gt;
 0x14    bytes[2]        unknown (align?)&lt;br /&gt;
 0x16    dword           timer&lt;br /&gt;
 0x1A    word            unknown activity&lt;br /&gt;
 0x1C    word            cars to generate&lt;br /&gt;
 0x1E    byte[2]         unknown control (flags?)&lt;br /&gt;
 0x20    byte[2]         unknown (align?)&lt;br /&gt;
 0x22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
 0x00    dword           car generator handle&lt;br /&gt;
 0x04    char[8]         numberplate string&lt;br /&gt;
 0x0C    byte[4]         unknown (align?)&lt;br /&gt;
 0x10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           constant 256&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1662</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1662"/>
		<updated>2008-05-25T20:21:25Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 12: Car Generators */ forgot to preview&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  (align) ?&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
 0x00    float           current asset value&lt;br /&gt;
 0x04    ----            unknown&lt;br /&gt;
 0x08    dword           ammo (or max asset value)&lt;br /&gt;
 0x0C    dword           unknown (timer?)&lt;br /&gt;
 0x10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x16    word            asset rate&lt;br /&gt;
 0x18    word            model&lt;br /&gt;
 0x1A    word            unknown (handle?)&lt;br /&gt;
 0x1C    byte            type&lt;br /&gt;
 0x1D    byte            unknown (flags?)&lt;br /&gt;
 0x1E    (Allign) ?&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword           count&lt;br /&gt;
 0x04   (align) ?  &lt;br /&gt;
 0x06                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword           num entries used&lt;br /&gt;
 0x04    Numplate[15]    number plates&lt;br /&gt;
 0xf4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
 0x00    word            handle (0..499)&lt;br /&gt;
 0x02    word            model&lt;br /&gt;
 0x04    byte[2]         colors&lt;br /&gt;
 0x06    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x0C    byte            heading/360*256&lt;br /&gt;
 0x0D    byte            alarm chance&lt;br /&gt;
 0x0E    byte            locked chance&lt;br /&gt;
 0x0F    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
 0x10    word            unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
 0x12    word            monetary value (unused?)&lt;br /&gt;
 0x14    bytes[2]        unknown (align?)&lt;br /&gt;
 0x16    dword           timer&lt;br /&gt;
 0x1A    word            unknown activity&lt;br /&gt;
 0x1C    word            cars to generate&lt;br /&gt;
 0x1E    byte[2]         unknown control (flags?)&lt;br /&gt;
 0x20    byte[2]         unknown (align?)&lt;br /&gt;
&lt;br /&gt;
0x22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
 0x00    dword           car generator handle&lt;br /&gt;
 0x04    char[8]         numberplate string&lt;br /&gt;
 0x0C    byte[4]         unknown (align?)&lt;br /&gt;
 0x10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           constant 256&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1661</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1661"/>
		<updated>2008-05-25T20:19:53Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 12: Car Generators */ filling in missing details&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums] or use [http://www.gtaforums.com/index.php?act=ST&amp;amp;f=223&amp;amp;t=322330 Save Game Path Editor] &lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0C  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2C  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3C  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4C  word          (Unknown) Possibly Original Type&lt;br /&gt;
   0x4E  (align) ?&lt;br /&gt;
   0x50  end&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
  0x00    dword           count&lt;br /&gt;
  0x04    Entry[count]    entries  --0x1C size&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
  0x00    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  0x18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups  --Size 0x20&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
 0x00    float           current asset value&lt;br /&gt;
 0x04    ----            unknown&lt;br /&gt;
 0x08    dword           ammo (or max asset value)&lt;br /&gt;
 0x0C    dword           unknown (timer?)&lt;br /&gt;
 0x10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
 0x16    word            asset rate&lt;br /&gt;
 0x18    word            model&lt;br /&gt;
 0x1A    word            unknown (handle?)&lt;br /&gt;
 0x1C    byte            type&lt;br /&gt;
 0x1D    byte            unknown (flags?)&lt;br /&gt;
 0x1E    (Allign) ?&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
 0x00    dword           count&lt;br /&gt;
 0x04   (align) ?  &lt;br /&gt;
 0x06                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
 0x00    dword           num entries used&lt;br /&gt;
 0x04    Numplate[15]    number plates&lt;br /&gt;
 0xf4                    end&lt;br /&gt;
&lt;br /&gt;
Car generator structure:&lt;br /&gt;
0x00    word            handle (0..499)&lt;br /&gt;
0x02    word            model&lt;br /&gt;
0x04    byte[2]         colors&lt;br /&gt;
0x06    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
0x0C    byte            heading/360*256&lt;br /&gt;
0x0D    byte            alarm chance&lt;br /&gt;
0x0E    byte            locked chance&lt;br /&gt;
0x0F    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
0x10    word            unknown setting (IPL field 11, scm field 7)&lt;br /&gt;
0x12    word            monetary value (unused?)&lt;br /&gt;
0x14    bytes[2]        unknown (align?)&lt;br /&gt;
0x16    dword           timer&lt;br /&gt;
0x1A    word            unknown activity&lt;br /&gt;
0x1C    word            cars to generate&lt;br /&gt;
0x1E    byte[2]         unknown control (flags?)&lt;br /&gt;
0x20    byte[2]         unknown (align?)&lt;br /&gt;
0x22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
 0x00    dword           car generator handle&lt;br /&gt;
 0x04    char[8]         numberplate string&lt;br /&gt;
 0x0C    byte[4]         unknown (align?)&lt;br /&gt;
 0x10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           constant 256&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1629</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1629"/>
		<updated>2008-04-26T07:25:44Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: Added Enex Flag information - still a few unknowns&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           constant 256&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
ENEX Flags&lt;br /&gt;
 BIT HEX   DEC NAME                  DESCRIPTION&lt;br /&gt;
 00 0001     1 unknown interior      Only used for interior markers&lt;br /&gt;
 01 0002     2 unknown pairing       Used mostly for interior markers; also Big Ear &amp;amp; LS Skyscraper&lt;br /&gt;
 02 0004     4 create linked pair    Pair with unflagged mate during new game start&lt;br /&gt;
 03 0008     8 reward interior       Sets flag 0010 on pair mate when used&lt;br /&gt;
 04 0010    16 used reward entrance  Set by accessing reward interior&lt;br /&gt;
 05 0020    32 cars and aircraft     Enable for cars and aircraft&lt;br /&gt;
 06 0040    64 bikes and motorcycles Enable for bikes and motorcycles&lt;br /&gt;
 07 0080   128 disable on foot       No foot traffic (use for cars and/or bikes only)&lt;br /&gt;
 &lt;br /&gt;
 08 0100   256 accept NPC group      Group members accepted at destination of pair&lt;br /&gt;
 09 0200   512 food date flag        Set and cleared by food date (cut-scene related)&lt;br /&gt;
 10 0400  1024 unknown burglary      Set on Bayside and Temporary Burglary doors&lt;br /&gt;
 11 0800  2048 disable exit          Player can enter but cannot exit a two-way pair&lt;br /&gt;
 12 1000  4096 burglary access       Enabled and disabled during Burglary&lt;br /&gt;
 13 2000  8192 entered without exit  Set by Entrance, Cleared by Exit; Applies to one side of a two-way pair&lt;br /&gt;
 14 4000 16384 enable access         Enabled by default; often cleared by scripts&lt;br /&gt;
 15 8000 32768 delete enex           Enex is deleted when used&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1622</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1622"/>
		<updated>2008-04-11T01:55:29Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 0: Miscellaneous */  updated with PS2 IDs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- PS2 Version 2 (Greatest Hits)&lt;br /&gt;
#* 0x4C 0xDC 0x1D 0x64 -- PS2 Version 1 (Original Edition)&lt;br /&gt;
&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           unknown (size of data +1?)&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1621</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1621"/>
		<updated>2008-04-11T01:15:29Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 21: IPL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           unknown (size of data +1?)&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
Usage: PCv1 can control the PCv2 carter objects by calling vegasn_stream2&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1620</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1620"/>
		<updated>2008-04-11T01:08:46Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 21: IPL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0906  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   float                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  dword         (Unknown)&lt;br /&gt;
 0x000B  dword         (Unknown)&lt;br /&gt;
 0x000F  dword         (Unknown)&lt;br /&gt;
 0x0013  dword[4]      (Unknown)&lt;br /&gt;
 0x0023  dword         (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte          (Unknown)&lt;br /&gt;
 0x001   byte[12]      (Unknown)&lt;br /&gt;
 0x00D   byte          (Unknown)&lt;br /&gt;
 0x00E   byte          (Unknown)&lt;br /&gt;
 0x00F   byte[12]      (Unknown)&lt;br /&gt;
 0x01B   dword         (Unknown)&lt;br /&gt;
 0x01F   dword         (Unknown)&lt;br /&gt;
 0x023   byte[12]      (Unknown)&lt;br /&gt;
 0x02F   dword         (Unknown)&lt;br /&gt;
 0x033   dword         (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes [[0186]], [[0187]], etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[100]   map fog array; each byte denotes state of the certain map sector (visited/not visited)&lt;br /&gt;
 0x0064  dword       number of opened map sectors&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 28h)&lt;br /&gt;
 0x04    dword           money&lt;br /&gt;
 0x08    word            (unknown)&lt;br /&gt;
 0x0A    byte            is wasted_or_busted flag&lt;br /&gt;
 0x0B    byte            (Align)&lt;br /&gt;
 0x0C    float           (unknown)&lt;br /&gt;
 0x10    dword           amount of money shown on screen&lt;br /&gt;
 0x14    byte            (unknown)&lt;br /&gt;
 0x15    byte[3]         (Align)&lt;br /&gt;
 0x18    dword           (unused) hidden packages left&lt;br /&gt;
 0x1C    dword           (unused) total hidden packages&lt;br /&gt;
 0x20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
 0x21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
 0x22    byte            fireproof ([[055D]])&lt;br /&gt;
 0x23    byte            max health&lt;br /&gt;
 0x24    byte            max armor (opcode [[055F]])&lt;br /&gt;
 0x25    byte            free busted once&lt;br /&gt;
 0x26    byte            free wasted once (opcode [[0414]])&lt;br /&gt;
 0x27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
 0x28    byte            (unknown)&lt;br /&gt;
 0x29    byte            (Align)&lt;br /&gt;
 0x2A    word            (unknown)&lt;br /&gt;
 0x2C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  byte[26316]   (unknown)&lt;br /&gt;
 0x66CC                end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
 x0000    dword           unknown (size of data +1?)&lt;br /&gt;
 x0004    byte[255]       Flags to enable binary IPLs (see notes below)&lt;br /&gt;
 x0103    end&lt;br /&gt;
&lt;br /&gt;
Notes: The order of the flags corresponds to the order the IPLs appear in gta3.img. These flags only affect non-stream IPLs; stream IPLs are always enabled regardless of flag value. (*plus something on the opcodes used to enable/disable the flags*)&lt;br /&gt;
&lt;br /&gt;
IPL Version Map:&lt;br /&gt;
 Hex Dec   PCv1                PCv2v3              PS2v1v2&lt;br /&gt;
 05    5   barriers1           countryn_stream0    levelmap_stream1&lt;br /&gt;
 06    6   barriers2           countryn_stream1    countryn_stream0&lt;br /&gt;
 2D   45   countryw_stream5    crack               sfe_stream2&lt;br /&gt;
 31   49   truthsfarm          sfse_stream3        sfs_stream0&lt;br /&gt;
 3E   62   crack               truthsfarm          crack&lt;br /&gt;
 3F   63   sfse_stream0        barriers1           sfse_stream0&lt;br /&gt;
 40   64   sfse_stream1        barriers2           sfse_stream1&lt;br /&gt;
 52   82   vegasn_stream2      carter              countryw_stream7&lt;br /&gt;
 55   85   vegasn_stream5      lae2_stream2        truthsfarm&lt;br /&gt;
 56   86   vegasn_stream6      lae2_stream3        barriers1&lt;br /&gt;
 57   87   vegasn_stream7      lae2_stream4        barriers2&lt;br /&gt;
 70  112   vegasw_stream6      lawn_stream3        carter&lt;br /&gt;
 7F  127   carter              countrye_stream5    lae_stream5&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x00    dword           size of block (always 58h)&lt;br /&gt;
 0x04    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
 0x05    byte[3]         (Align)&lt;br /&gt;
 0x08    dword           current gang war stage&lt;br /&gt;
                             0: no war&lt;br /&gt;
                             1: war provoked&lt;br /&gt;
                             2: first wave&lt;br /&gt;
                             3: first wave passed&lt;br /&gt;
                             4: second wave&lt;br /&gt;
                             5: second wave passed&lt;br /&gt;
                             6: third wave&lt;br /&gt;
 0x0C    dword           time when last stage started&lt;br /&gt;
 0x10    dword           index of warzone in [[#Block_10:_Zones|ZonePop array]]&lt;br /&gt;
 0x14    dword           index of warzone in [[#Block_10:_Zones|ZoneInfo array]]&lt;br /&gt;
 0x18    float[3]        unknown XYZ&lt;br /&gt;
 0x24    dword           (unknown)&lt;br /&gt;
 0x28    dword           (unknown)&lt;br /&gt;
 0x2C    dword           (unknown)&lt;br /&gt;
 0x30    dword           unknown time&lt;br /&gt;
 0x34    dword           hood under attack stage (?)&lt;br /&gt;
 0x38    dword           next attack time (?)&lt;br /&gt;
 0x3C    float[3]        unknown XYZ&lt;br /&gt;
 0x48    dword           hood attack notify time (?)&lt;br /&gt;
 0x4C    dword           hood attack marker handle (?)&lt;br /&gt;
 0x50    byte            (unknown)&lt;br /&gt;
 0x51    byte[3]         (Align)&lt;br /&gt;
 0x54    float           territories under control ([[08E2]])&lt;br /&gt;
 0x58    float           same as above (0x54)&lt;br /&gt;
 0x5C                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Radio Data====&lt;br /&gt;
This block contains data relating to various radio stations. The bulk of the block is an array of data structures for each station. Not much is known about these structures currently but part of the data seems to be a record of which tracks have played recently. Following this array of structures there is a collection of byte flags which are related to high-number player Stats. These Stats are used to trigger different episodes and radio clips throughout the game. Note that the &amp;quot;set by&amp;quot; comments refer to missions in the original, unmodified game and they can obviously be set at different times instead.&lt;br /&gt;
 &lt;br /&gt;
 0x0000 StationInfo[14] State info for radio stations; each is 0x110 in size -- see details below&lt;br /&gt;
 0x0EE0 byte            Cities Unlocked (stat 181)&lt;br /&gt;
 0x0EE1 byte            (stat 327; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE2 byte            (stat 328; set by &amp;quot;The Meat Business&amp;quot;)&lt;br /&gt;
 0x0EE3 byte            (stat 329; set by &amp;quot;St. Mark's Bistro&amp;quot;)&lt;br /&gt;
 0x0EE4 byte            I Say / You Say Ep#2 (stat 318; set by &amp;quot;Local Liquor Store&amp;quot;)&lt;br /&gt;
 0x0EE5 byte            (stat 320; set by &amp;quot;Monster&amp;quot;)&lt;br /&gt;
 0x0EE6 byte            (stat 330; set by &amp;quot;Interdiction&amp;quot;)&lt;br /&gt;
 0x0EE7 byte            (stat 331; set by &amp;quot;Learning to Fly&amp;quot;)&lt;br /&gt;
 0x0EE8 byte            (stat 332; set by &amp;quot;Black Project&amp;quot;)&lt;br /&gt;
 0x0EE9 byte            (stat 333; set by &amp;quot;Green Goo&amp;quot;)&lt;br /&gt;
 0x0EEA byte            (stat 311; set by &amp;quot;Mike Toreno&amp;quot;)&lt;br /&gt;
 0x0EEB byte            (stat 323; set by &amp;quot;Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EEC byte            News Ep#9 (stat 308; set by &amp;quot;Vertical Bird&amp;quot;)&lt;br /&gt;
 0x0EED byte            (stat 310; set by &amp;quot;OG Loc&amp;quot;)&lt;br /&gt;
 0x0EEE byte            (stat 335; set by &amp;quot;Riot&amp;quot;)&lt;br /&gt;
 0x0EEF byte            (stat 336; set by &amp;quot;555 We Tip&amp;quot;)&lt;br /&gt;
 0x0EF0 byte            (stat 337; set by &amp;quot;House Party&amp;quot;)&lt;br /&gt;
 0x0EF1 byte            (stat 302; set by &amp;quot;Drive-Thru&amp;quot;)&lt;br /&gt;
 0x0EF2 byte            (stat 338; set by &amp;quot;Are you going to San Fierro?&amp;quot;)&lt;br /&gt;
 0x0EF3 byte            (stat 339; set by &amp;quot;High Noon&amp;quot;)&lt;br /&gt;
 0x0EF4 byte            (stat 340; set by &amp;quot;The Green Sabre&amp;quot;)&lt;br /&gt;
 0x0EF5 byte            (stat 341; set by &amp;quot;Small Town Bank&amp;quot;)&lt;br /&gt;
 0x0EF6 byte            (stat 342; set by &amp;quot;Farewell My Love&amp;quot;)&lt;br /&gt;
 0x0EF7 byte            month day when the stats above were updated&lt;br /&gt;
 0x0EF8 byte            hour when the stats above were updated&lt;br /&gt;
 0x0EF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0x0EFA byte            updating flag (1,2,3)&lt;br /&gt;
 0x0EFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0x0EFC (end)&lt;br /&gt;
&lt;br /&gt;
 StationInfo Structure:&lt;br /&gt;
  0x000 byte[20]        Possibly a stack of indices of recently-played tracks&lt;br /&gt;
  0x014 dword[8]        (Unknown)&lt;br /&gt;
  0x034 dword[40]       (Unknown)&lt;br /&gt;
  0x0D4 dword[15]       (Unknown)&lt;br /&gt;
  0x110 (end)&lt;br /&gt;
&lt;br /&gt;
 Order of Stations for the StationInfo Structure Array&lt;br /&gt;
  IDX Stream Description&lt;br /&gt;
    0   AA   Emergency Band&lt;br /&gt;
    1   CH   Playback FM&lt;br /&gt;
    2   CO   KROSE&lt;br /&gt;
    3   CR   K-DST&lt;br /&gt;
    4   DS   Bounce&lt;br /&gt;
    5   HC   SFUR&lt;br /&gt;
    6   MH   Radio Los Santos&lt;br /&gt;
    7   MR   Radio X&lt;br /&gt;
    8   NJ   CSR&lt;br /&gt;
    9   RE   K-JAH West&lt;br /&gt;
   10   RG   Master Sounds&lt;br /&gt;
   11   TK   WCTR&lt;br /&gt;
   12   --   User Track Player&lt;br /&gt;
   13   ??   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1485</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1485"/>
		<updated>2007-12-22T06:57:38Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 15: Player data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  25    byte            (unknown)&lt;br /&gt;
  26    byte            free treatment once (opcode [[0414]])&lt;br /&gt;
  27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1484</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1484"/>
		<updated>2007-12-22T06:55:01Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 15: Player data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      Boolean: time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      Boolean: has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode [[09AD]])&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  float     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      Boolean: riot mode flag (opcode [[06C8]])&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level (opcode [[01F0]])&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode [[040C]])&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode [[0572]] flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode [[0A3D]] flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  25    byte            unknown&lt;br /&gt;
  26    byte            free treatment once (opcode [[0414]])&lt;br /&gt;
  27    byte            enable driveby (opcode [[0501]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1482</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1482"/>
		<updated>2007-12-21T23:54:33Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 3: Garages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages disabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1480</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1480"/>
		<updated>2007-12-20T11:34:41Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 17: Police trigger zones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://msdn2.microsoft.com/en-us/library/ms724950.aspx SYSTEMTIME]&amp;lt;/span&amp;gt; wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[2]    (Align)&lt;br /&gt;
   0x0194  dword      unknown (ENEX related)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages enabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                police trigger last activation time&lt;br /&gt;
   0x0004  word[2]              police trigger zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              police trigger zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle A starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle A initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle B starting point (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle B initial direction (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 police trigger type; see details below&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Police Trigger Types&lt;br /&gt;
* 1 - On Foot with 1 star spawns 2 cop cars moving slowly&lt;br /&gt;
* 2 - In Vehicle with 2 stars spawns 1 cop car moving quickly&lt;br /&gt;
* 3 - In Vehicle with 2 stars spawns 1 cop car at medium speed&lt;br /&gt;
* 4 - On Foot with 1 star spawns 1 cop pedestrian&lt;br /&gt;
* 5 - On Foot with 1 star spawns 2 cop pedestrians&lt;br /&gt;
* 6 - In Vehicle with 2 stars spawns 2 cop cars moving quickly before hitting breaks&lt;br /&gt;
* 7 - In Vehicle with 2 stars spawns 2 cop cars moving quickly&lt;br /&gt;
* 8 - On Foot with 1 star spawns 2 cop cars at medium speed&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police Triggers are a special zone consisting of a rectangle defined by 2 ends of the rectangle diagonal, and two rays defined by a starting point and point along the ray indicating the initial direction of travel. &lt;br /&gt;
# When the player is in the police trigger rectangle and meets the requirements of the police trigger type, then a cop will spawn at the endpoint of ray A headed in the direction of the 2nd defined point. &lt;br /&gt;
# If the police trigger type includes 2 police, then a cop will also spawn along ray B. &lt;br /&gt;
# The police are not bound to continue in the specified direction after their initial spawn.  &lt;br /&gt;
# In order to trigger In Vehicle trigger types the vehicle must be moving.&lt;br /&gt;
# Police trigger zones are activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# Police trigger zones can be created using opcode [[04F8]]&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1465</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1465"/>
		<updated>2007-12-15T03:42:16Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 10: Zones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[6]    (unknown)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages enabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])* see notes below&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
Notes: the ZonePop byte at offset 0x0F appears to use the upper 3 bits for flags. Bit 0x20 will be set if gangs are present in the zone and cleared if no gangs are present. Bit 0x40 is unobserved, and cleared if set manually. Bit 0x80 is set with opcode 09B7 and disables the footcops in that zone.&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1458</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1458"/>
		<updated>2007-12-15T03:15:44Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 10: Zones */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  StaticReplacement[25]     each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x0710  InvisibleObject[20]       each is 8 bytes in size; see details below&lt;br /&gt;
 0x07B0  dword[20]                 keeps model identifiers which are excluded from &lt;br /&gt;
                                   the carparking generation (similar to opcode [[03C5]]). Unused.&lt;br /&gt;
 0x0800  LodAssignment[10]         each is 8 bytes in size; see details below&lt;br /&gt;
 0x0850  ScriptAssignment[8]       each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x08F0  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F1  byte                      Boolean: unknown flag (UNUSED)&lt;br /&gt;
 0x08F2  dword                     scm size&lt;br /&gt;
 0x08F6  dword                     max mission size&lt;br /&gt;
 0x08FA  dword                     missions number&lt;br /&gt;
 0x08FE  dword                     highest local variable ever in a mission&lt;br /&gt;
 0x0902  dword                     Number of Running Threads (nThreads)&lt;br /&gt;
 0x0004  Thread[nThreads]          Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode [[0707]])&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
 StaticReplacement&lt;br /&gt;
   0x00  dword          type (always = 2)&lt;br /&gt;
   0x04  dword          handle of the static object (building)&lt;br /&gt;
   0x08  dword          new modelID&lt;br /&gt;
   0x0C  dword          old modelID&lt;br /&gt;
&lt;br /&gt;
Note: this structure related to opcode [[03B6]].&lt;br /&gt;
&lt;br /&gt;
 InvisibleObject&lt;br /&gt;
   0x00  dword          type&lt;br /&gt;
   0x04  dword          handle of the object&lt;br /&gt;
&lt;br /&gt;
This structure contains handle and type of an object created as invisible one. There are 3 kinds of the types: 2 - static object; 3 - dynamic object; 4 - dummy. Via [[:Category:Mission_Scripting|mission scripting]] it's only possible to create a first kind of such object (static) - using opcode [[0363]], so normally the 'type' parameter is equal to 2.&lt;br /&gt;
&lt;br /&gt;
 LodAssignment&lt;br /&gt;
   0x00  dword          Handle of the object&lt;br /&gt;
   0x04  dword          Handle of the LOD object&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[0827]].&lt;br /&gt;
&lt;br /&gt;
 ScriptAssignment&lt;br /&gt;
   0x00  dword          modelID of the actor we assing the external script to&lt;br /&gt;
   0x04  char[8]        external script handle as created with opcode [[0884]]&lt;br /&gt;
   0x0C  dword          unknown&lt;br /&gt;
   0x10  dword          unknown&lt;br /&gt;
&lt;br /&gt;
This structure related to opcode [[08E8]].&lt;br /&gt;
&lt;br /&gt;
====Block 2: Players &amp;amp; Objects ====&lt;br /&gt;
Information about players (commonly only one) and mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword      Number of Players&lt;br /&gt;
 0x0004  Player[]   Player structures -- each is 0x228 bytes in size; see details below&lt;br /&gt;
 0x0000  dword      Number of Objects&lt;br /&gt;
 0x0004  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Player Structure:&lt;br /&gt;
   0x0000  dword      Handle of a player actor&lt;br /&gt;
   0x0004  dword      Model ID&lt;br /&gt;
   0x0008  dword      PedType&lt;br /&gt;
   &lt;br /&gt;
   0x000C  dword      size of the following data (0x18C)&lt;br /&gt;
   0x0010  float[3]   X, Y, Z&lt;br /&gt;
   0x001C  float      Health&lt;br /&gt;
   0x0020  float      Armor&lt;br /&gt;
   0x0024  Weapon[13] Weapon Structure -- each is 0x1C in size; see details below&lt;br /&gt;
   0x0190  byte       Ped reference (normally 2)&lt;br /&gt;
   0x0191  byte       Current weapon slot&lt;br /&gt;
   0x0192  byte[6]    (unknown)&lt;br /&gt;
   0x0198  byte       melee style 1?&lt;br /&gt;
   0x0199  byte       melee style 2?&lt;br /&gt;
   0x019A  byte[2]    (Align)&lt;br /&gt;
   &lt;br /&gt;
   0x019C  dword      size of the following data (0x84)&lt;br /&gt;
   0x01A0  dword      chaos&lt;br /&gt;
   0x01A4  byte       wanted level&lt;br /&gt;
   0x01A5  byte[3]    (Align)&lt;br /&gt;
   0x01A8  dword      CRC32 of filename for Torso model&lt;br /&gt;
   0x01AC  dword      CRC32 of filename for Head model&lt;br /&gt;
   0x01B0  dword      CRC32 of filename for (unknown)&lt;br /&gt;
   0x01B4  dword      CRC32 of filename for Legs model&lt;br /&gt;
   0x01B8  dword      CRC32 of filename for Feet model&lt;br /&gt;
   0x01BC  dword      CRC32 of filename for Chain model&lt;br /&gt;
   0x01C0  dword      CRC32 of filename for Watch model&lt;br /&gt;
   0x01C4  dword      CRC32 of filename for Shades model&lt;br /&gt;
   0x01C8  dword      CRC32 of filename for Hat model&lt;br /&gt;
   0x01CC  dword      CRC32 of filename for Special model&lt;br /&gt;
   0x01D0  dword      CRC32 of filename for Torso texture&lt;br /&gt;
   0x01D4  dword      CRC32 of filename for Head texture&lt;br /&gt;
   0x01D8  dword      CRC32 of filename for Legs texture&lt;br /&gt;
   0x01DC  dword      CRC32 of filename for Feet texture&lt;br /&gt;
   0x01E0  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
   0x01E4  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
   0x01E8  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
   0x01EC  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
   0x01F0  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
   0x01F4  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
   0x01F8  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
   0x01FC  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
   0x0200  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
   0x0204  dword      CRC32 of filename for Chain texture&lt;br /&gt;
   0x0208  dword      CRC32 of filename for Watch texture&lt;br /&gt;
   0x020C  dword      CRC32 of filename for Shades texture&lt;br /&gt;
   0x0210  dword      CRC32 of filename for Hat texture&lt;br /&gt;
   0x0214  dword      CRC32 of filename for Special texture&lt;br /&gt;
   0x0218  float      Body Fat (used for current body type)&lt;br /&gt;
   0x022C  float      Body Muscle (used for current body type)&lt;br /&gt;
   0x0224  byte[4]    Align&lt;br /&gt;
&lt;br /&gt;
 Weapon Structure:&lt;br /&gt;
   0x00  dword        Weapon Type&lt;br /&gt;
   0x04  dword        (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword        (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword        Weapon Ammo&lt;br /&gt;
   0x10  dword        (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]      (unknown)&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  dword        Handle&lt;br /&gt;
   0x04  dword        Model ID&lt;br /&gt;
   0x08  dword        constant 48&lt;br /&gt;
   0x0C  float[3]     X, Y, Z&lt;br /&gt;
   0x18  byte[3]      CXYZ.right.xyz&lt;br /&gt;
   0x1B  byte[3]      CXYZ.top.xyz&lt;br /&gt;
   0x1E  byte[30]     (unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          Free Bombs&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode [[0335]])&lt;br /&gt;
 0x0006  byte          Boolean: Respray Garages enabled (opcode [[0A14]])&lt;br /&gt;
 0x0007  byte[32]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: Wasted/Busted====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  dword           Number of Block4Struct structures&lt;br /&gt;
 0x0004  byte            Boolean: Lose stuff after wasted (opcode 08DD)&lt;br /&gt;
 0x0005  byte            Boolean: Lose stuff after busted (opcode 08DE)&lt;br /&gt;
 0x0006  byte            unknown Wasted_Busted Flag&lt;br /&gt;
 0x0007  dword           unknown Wasted_Busted time&lt;br /&gt;
 0x000B  Block4Struct[]  unknown structures (UNUSED?) -- see details below&lt;br /&gt;
&lt;br /&gt;
 Block4Struct structure:&lt;br /&gt;
  0x0000  byte[12]        (unknown)&lt;br /&gt;
  0x000C  byte[4]         (unknown)&lt;br /&gt;
  0x0010  end&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
* Note: these structures somehow related to opcodes [[0606]], [[0607]]&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x000   word          Wasted structures number&lt;br /&gt;
 0x002   Restart[]     Wasted structures&lt;br /&gt;
 0x000   word          Busted structures number&lt;br /&gt;
 0x002   Restart[]     Busted structures&lt;br /&gt;
 0x000   byte[55]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0x000   float[3]      coords&lt;br /&gt;
   0x00C   float         heading&lt;br /&gt;
   0x010   dword         town (island)&lt;br /&gt;
   0x014   end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Markers====&lt;br /&gt;
 OFFSET  TYPE           DESCRIPTION&lt;br /&gt;
 0x0000  Markers[175]   Marker structures -- each is 0x28 bytes in size, see details below&lt;br /&gt;
 0x1B58  end &lt;br /&gt;
&lt;br /&gt;
 Marker structure:&lt;br /&gt;
   0x000  dword         color&lt;br /&gt;
   0x004  dword         entity handle this marker is attached to (opcodes 0186, 0187, etc)&lt;br /&gt;
   0x008  float[3]      position X,Y,Z&lt;br /&gt;
   0x014  word          index?&lt;br /&gt;
   0x016  byte[2]       (Align)&lt;br /&gt;
   0x018  float         sphere radius&lt;br /&gt;
   0x01C  word          icon size&lt;br /&gt;
   0x01E  byte[2]       (Align)&lt;br /&gt;
   0x020  dword         (unknown)&lt;br /&gt;
   0x024  dword         Icon ID&lt;br /&gt;
   0x025  byte[2]       unknown flags&lt;br /&gt;
   0x027  byte          (Align)&lt;br /&gt;
   0x028  end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode [[076C]])&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Dealer Density (set by opcode [[076A]])&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode [[0767]])&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode [[0874]])&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode [[0330]])&lt;br /&gt;
  21    byte            fast reload (opcode [[0331]]) &lt;br /&gt;
  22    byte            fireproof ([[055D]])&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode [[055F]])&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode [[0879]])&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
 0x000 Structure[14]   -- see details below&lt;br /&gt;
 0xEE0 byte            availables cities number (stat 181)&lt;br /&gt;
 0xEE1 byte            least favorite radio (stat 327)&lt;br /&gt;
 0xEE2 byte            current weapon skill (stat 328)&lt;br /&gt;
 0xEE3 byte            weapon skill levels (stat 329)&lt;br /&gt;
 0xEE4 byte            &amp;quot;Local Liquor Store&amp;quot; mission accomplished  (stat 318)&lt;br /&gt;
 0xEE5 byte            playing time (stat 320)&lt;br /&gt;
 0xEE6 byte            pilot ranking (stat 330)&lt;br /&gt;
 0xEE7 byte            strongest gang  (stat 331)&lt;br /&gt;
 0xEE8 byte            2nd strongest gang (stat 332)&lt;br /&gt;
 0xEE9 byte            3rd strongest gang (stat 333)&lt;br /&gt;
 0xEEA byte            &amp;quot;Mike Toreno&amp;quot; mission accomplished (stat 311)&lt;br /&gt;
 0xEEB byte            least favorite gang (stat 323)&lt;br /&gt;
 0xEEC byte            &amp;quot;A Home In The Hills&amp;quot; mission accomplished  (stat 308)&lt;br /&gt;
 0xEED byte            &amp;quot;Robbing Uncle Sam&amp;quot; mission accomplished  (stat 310)&lt;br /&gt;
 0xEEE byte            (stat 335)&lt;br /&gt;
 0xEEF byte            gang strength (stat 336)&lt;br /&gt;
 0xEF0 byte            territory under control (stat 337)&lt;br /&gt;
 0xEF1 byte            &amp;quot;Drive-thru&amp;quot; mission accomplished (stat 302)&lt;br /&gt;
 0xEF2 byte            &amp;quot;Are you going to San Fierro?&amp;quot; mission accomplished  (stat 338)&lt;br /&gt;
 0xEF3 byte            &amp;quot;High Noon&amp;quot; mission accomplished (stat 339)&lt;br /&gt;
 0xEF4 byte            &amp;quot;The Green Sabre&amp;quot; mission accomplished  (stat 340)&lt;br /&gt;
 0xEF5 byte            (stat 341)&lt;br /&gt;
 0xEF6 byte            (stat 342)&lt;br /&gt;
 0xEF7 byte            month day when the stats above were updated&lt;br /&gt;
 0xEF8 byte            hour when the stats above were updated&lt;br /&gt;
 0xEF9 byte            hours to the next stats update (commonly 24 or 168)&lt;br /&gt;
 0xEFA byte            updating flag (1,2,3)&lt;br /&gt;
 0xEFB byte            last updated stat (in accordance with the given order)&lt;br /&gt;
 0xEFC                 end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
 0x000 byte[20]&lt;br /&gt;
 0x014    dword[8]&lt;br /&gt;
 0x034    dword[40]&lt;br /&gt;
 0x0D4    dword[15]&lt;br /&gt;
 0x110    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1407</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1407"/>
		<updated>2007-12-05T19:26:57Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 2: Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown)&lt;br /&gt;
 0x0014  float[3]   X, Y, Z, (last position?)&lt;br /&gt;
 0x0020  float      Player Health&lt;br /&gt;
 0x0024  float      Player Armor&lt;br /&gt;
 0x0028  Weapon[]   Weapon Stucture -- each is 0x1C in size; see details below&lt;br /&gt;
 0x0194  byte       (unknown) object type 02 = player?&lt;br /&gt;
 0x0195  byte       Armed slot (copy 1?)&lt;br /&gt;
 0x0196  byte[22]   (unknown)&lt;br /&gt;
 0x01AC  dword      CRC32 of filename for Torso model&lt;br /&gt;
 0x01B0  dword      CRC32 of filename for Head model&lt;br /&gt;
 0x01B4  dword      CRC32 of filename for (unknown)&lt;br /&gt;
 0x01B8  dword      CRC32 of filename for Legs model&lt;br /&gt;
 0x01BC  dword      CRC32 of filename for Feet model&lt;br /&gt;
 0x01C0  dword      CRC32 of filename for Chain model&lt;br /&gt;
 0x01C4  dword      CRC32 of filename for Watch model&lt;br /&gt;
 0x01C8  dword      CRC32 of filename for Shades model&lt;br /&gt;
 0x01CC  dword      CRC32 of filename for Hat model&lt;br /&gt;
 0x01D0  dword      CRC32 of filename for Special model&lt;br /&gt;
 0x01D4  dword      CRC32 of filename for Torso texture&lt;br /&gt;
 0x01D8  dword      CRC32 of filename for Head texture&lt;br /&gt;
 0x01DC  dword      CRC32 of filename for Legs texture&lt;br /&gt;
 0x01E0  dword      CRC32 of filename for Feet texture&lt;br /&gt;
 0x01E4  dword      CRC32 of filename for Upper Left Arm Tattoo texture&lt;br /&gt;
 0x01E8  dword      CRC32 of filename for Lower Left Arm Tattoo texture&lt;br /&gt;
 0x01EC  dword      CRC32 of filename for Upper Right Arm Tattoo texture&lt;br /&gt;
 0x01F0  dword      CRC32 of filename for Lower Right Arm Tattoo texture&lt;br /&gt;
 0x01F4  dword      CRC32 of filename for Back Tattoo texture&lt;br /&gt;
 0x01F8  dword      CRC32 of filename for Left Chest Tattoo texture&lt;br /&gt;
 0x01FC  dword      CRC32 of filename for Right Chest Tattoo texture&lt;br /&gt;
 0x0200  dword      CRC32 of filename for Stomach Tattoo texture&lt;br /&gt;
 0x0204  dword      CRC32 of filename for Lower Back Tattoo texture&lt;br /&gt;
 0x0208  dword      CRC32 of filename for Chain texture&lt;br /&gt;
 0x020C  dword      CRC32 of filename for Watch texture&lt;br /&gt;
 0x0210  dword      CRC32 of filename for Shades texture&lt;br /&gt;
 0x0214  dword      CRC32 of filename for Hat texture&lt;br /&gt;
 0x0218  dword      CRC32 of filename for Special texture&lt;br /&gt;
 0x021C  float      Body Fat (used for current body type)&lt;br /&gt;
 0x0220  float      Body Muscle (used for current body type)&lt;br /&gt;
 0x0224  byte       Armed Slot (copy 2?)&lt;br /&gt;
 0x0225  byte[2]    (unknown)&lt;br /&gt;
 0x0227  byte       (unknown) - align&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Weapon Stucture:&lt;br /&gt;
   0x00  byte        Weapon Type&lt;br /&gt;
   0x01  byte        (unknown) caused crash when set to 01&lt;br /&gt;
   0x02  byte[2]     (unknown) not part of type&lt;br /&gt;
   0x04  dword       (unknown) possibly Weapon state&lt;br /&gt;
   0x08  dword       (unknown) possibly Ammo in clip&lt;br /&gt;
   0x0C  dword       Weapon Ammo&lt;br /&gt;
   0x10  dword       (unknown) possibly Shots fired&lt;br /&gt;
   0x14  byte[8]     (unknown)&lt;br /&gt;
&lt;br /&gt;
Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0874)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1406</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1406"/>
		<updated>2007-12-01T22:59:04Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 21: IPL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[3]   X, Y, Z, (last position?)&lt;br /&gt;
 0x0020  float      Player Health&lt;br /&gt;
 0x0024  float      Player Armor&lt;br /&gt;
 0x0028  word       Unarmed type (slot 0)&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type (slot 1)&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type (slot 2)&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type (slot 3)&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type (slot 4)&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type (slot 5)&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type (slot 6)&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type (slot 7)&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type (slot 8)&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type (slot 9)&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type  (slot 10)&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type (slot 11)&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type (slot 12)&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  byte[104]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0874)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang Weapons====&lt;br /&gt;
 OFFSET  TYPE            DESCRIPTION&lt;br /&gt;
 0x0000  GangWeapons[10] GangWeapons structures -- each is 0x10 bytes in size; see details below&lt;br /&gt;
 0x00a0  (end)&lt;br /&gt;
&lt;br /&gt;
 GangWeapons[]           &lt;br /&gt;
   0x00  byte[4]         unused&lt;br /&gt;
   0x04  dword           weaponID A&lt;br /&gt;
   0x08  dword           weaponID B&lt;br /&gt;
   0x0c  dword           weaponID C&lt;br /&gt;
   0x10  (end)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
&lt;br /&gt;
  00    dword&lt;br /&gt;
  04    byte[255]       (mostly unknown)&lt;br /&gt;
  05    byte            BARRIERS1         v1 Barriers to SF&lt;br /&gt;
  06    byte            BARRIERS2         v1 Barriers to LV&lt;br /&gt;
  2D    byte            CRACK             v2 Pre-Yay Ka-Boom Boom Factory (45)&lt;br /&gt;
  31    byte            TRUTHSFARM        v1 Crops at Truth's Farm (49)&lt;br /&gt;
  3E    byte            CRACK             v1 Pre-Yay Ka-Boom Boom Factory (62)&lt;br /&gt;
  3E    byte            TRUTHSFARM        v2 Crops at Truth's Farm (62)&lt;br /&gt;
  3F    byte            BARRIERS1         v2 Barriers to SF (63)&lt;br /&gt;
  40    byte            BARRIERS2         v2 Barriers to LV (64)&lt;br /&gt;
  52    byte            CARTER            v2 1st Floor of Smoke's Palace (82)&lt;br /&gt;
  7F    byte            CARTER            v1 1st Floor of Smoke's Palace (127)&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1387</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1387"/>
		<updated>2007-11-16T10:06:21Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 21: IPL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[3]   X, Y, Z, (last position?)&lt;br /&gt;
 0x0020  float      Player Health&lt;br /&gt;
 0x0024  float      Player Armor&lt;br /&gt;
 0x0028  word       Unarmed type (slot 0)&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type (slot 1)&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type (slot 2)&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type (slot 3)&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type (slot 4)&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type (slot 5)&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type (slot 6)&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type (slot 7)&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type (slot 8)&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type (slot 9)&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type  (slot 10)&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type (slot 11)&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type (slot 12)&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   00    dword&lt;br /&gt;
   04    byte[255]       (mostly unknown)&lt;br /&gt;
   05    byte            BARRIERS1         Barriers to SF &lt;br /&gt;
   06    byte            BARRIERS2         Barriers to LV&lt;br /&gt;
   31    byte            TRUTHSFARM        Crops at Truth's Farm&lt;br /&gt;
   3E    byte            CRACK             Pre-Yay Ka-Boom Boom Factory&lt;br /&gt;
   7F    byte            CARTER            1st Floor of Smoke's Palace&lt;br /&gt;
  103                    end&lt;br /&gt;
&lt;br /&gt;
Note: the version 2 executable seems to flag these objects differently.&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1379</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1379"/>
		<updated>2007-11-11T20:25:09Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 2: Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[3]   X, Y, Z, (last position?)&lt;br /&gt;
 0x0020  float      Player Health&lt;br /&gt;
 0x0024  float      Player Armor&lt;br /&gt;
 0x0028  word       Unarmed type (slot 0)&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type (slot 1)&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type (slot 2)&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type (slot 3)&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type (slot 4)&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type (slot 5)&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type (slot 6)&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type (slot 7)&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type (slot 8)&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type (slot 9)&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type  (slot 10)&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type (slot 11)&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type (slot 12)&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1376</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1376"/>
		<updated>2007-11-09T19:42:38Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 2: Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type (slot 0)&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type (slot 1)&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type (slot 2)&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type (slot 3)&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type (slot 4)&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type (slot 5)&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type (slot 6)&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type (slot 7)&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type (slot 8)&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type (slot 9)&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type  (slot 10)&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type (slot 11)&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type (slot 12)&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1375</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1375"/>
		<updated>2007-11-09T19:36:06Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 3: Garages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[4]       (Unknown)&lt;br /&gt;
   0x10  byte          Car Flags&lt;br /&gt;
   0x11  byte          (Unknown)&lt;br /&gt;
   0x12  word          Vehicle Model ID&lt;br /&gt;
   0x14  word[15]      Installed Vehicle Mods (see veh_mods.ide)&lt;br /&gt;
   0x32  byte[4]       Primary Color, Secondary Color, Tertiary Color, (Unknown) Quaternary Color?&lt;br /&gt;
   0x36  byte          Radio Station&lt;br /&gt;
   0x37  byte[2]       Vehicle Variation&lt;br /&gt;
   0x39  byte          Bomb Type&lt;br /&gt;
   0x3A  byte          Paintjob&lt;br /&gt;
   0x3B  byte          Nitrous Count&lt;br /&gt;
   0x3C  byte[3]       Vector Rotation&lt;br /&gt;
   0x3F  byte          (unknown) Align&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags (hex value of bit) &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
 Car Flags (hex value of bit)&lt;br /&gt;
     0x01      bulletproof&lt;br /&gt;
     0x02      fireproof&lt;br /&gt;
     0x04      explosion proof&lt;br /&gt;
     0x08      damage proof &lt;br /&gt;
     0x10      5th immunity&lt;br /&gt;
     0x20      bass boost&lt;br /&gt;
     0x40      hydraulics&lt;br /&gt;
     0x80      nitrous flag&lt;br /&gt;
&lt;br /&gt;
 Bomb Types&lt;br /&gt;
     1         5 sec detonator (garage type 2)&lt;br /&gt;
     2         ignition bomb unarmed (garage type 3)&lt;br /&gt;
     3         remote detonator (garage type 4)&lt;br /&gt;
     5         ignition bomb armed (garage type 3)&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1374</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1374"/>
		<updated>2007-11-09T11:04:01Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 3: Garages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages &lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags  &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1373</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1373"/>
		<updated>2007-11-09T11:02:18Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 3: Garages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[2]       Door Flags&lt;br /&gt;
   0x03  byte          (Unknown) Align&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         Door is Open = 1&lt;br /&gt;
   0x40  float         (Unknown)door timer/timestamp?&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
 Door Flags  &lt;br /&gt;
   offset 0x01  &lt;br /&gt;
     0x01      door is open flag (0x3c changes door)&lt;br /&gt;
   offset 0x02&lt;br /&gt;
     0x01      used mod shop (?)&lt;br /&gt;
     0x02      inactive door&lt;br /&gt;
     0x04      used Pay'n'Spray (?)&lt;br /&gt;
     0x08      small door (reflective?)&lt;br /&gt;
     0x10      up and in door&lt;br /&gt;
     0x20      camera follows player&lt;br /&gt;
     0x40      door is closed flag (0x3c changes door)&lt;br /&gt;
     0x80      girlfriend PnS&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1372</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1372"/>
		<updated>2007-11-09T10:13:25Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 3: Garages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0004  byte          (Unknown)&lt;br /&gt;
 0x0005  byte          Free Resprays (opcode 0335)&lt;br /&gt;
 0x0006  byte[33]      (Unknown) &lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1371</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1371"/>
		<updated>2007-11-09T10:10:27Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 2: Objects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  dword[5]   (Unknown) &lt;br /&gt;
 0x0014  float[4]   X, Y, Z, Angle of (last position?)&lt;br /&gt;
 0x0024  float      Armor ammo (current armor level)&lt;br /&gt;
 0x0028  word       Unarmed type&lt;br /&gt;
 0x0034  dword      (unarmed ammo)&lt;br /&gt;
 0x0044  word       Melee type&lt;br /&gt;
 0x0050  dword      (melee ammo)&lt;br /&gt;
 0x0060  word       Pistol type&lt;br /&gt;
 0x006C  dword      Pistol ammo&lt;br /&gt;
 0x007C  word       Shotgun type&lt;br /&gt;
 0x0088  dword      Shotgun ammo&lt;br /&gt;
 0x0098  word       Uzi type&lt;br /&gt;
 0x00A4  dword      Uzi ammo&lt;br /&gt;
 0x00B4  word       Assault type&lt;br /&gt;
 0x00C0  dword      Assault ammo&lt;br /&gt;
 0x00D0  word       Rifle type&lt;br /&gt;
 0x00DC  dword      Rifle ammo&lt;br /&gt;
 0x00EC  word       Heavy type&lt;br /&gt;
 0x00F8  dword      Heavy ammo&lt;br /&gt;
 0x0108  word       Thrown type&lt;br /&gt;
 0x0114  dword      Thrown ammo&lt;br /&gt;
 0x0124  word       Special type&lt;br /&gt;
 0x0130  dword      Special ammo (goggles need ammo)&lt;br /&gt;
 0x0140  word       Gift type&lt;br /&gt;
 0x014C  dword      (Gift ammo)&lt;br /&gt;
 0x015C  word       Tool type&lt;br /&gt;
 0x0168  dword      Tool ammo&lt;br /&gt;
 0x0178  word       Detonator type&lt;br /&gt;
 0x0184  dword      (Detonator ammo)&lt;br /&gt;
 0x0195  byte       Armed slot &lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1370</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1370"/>
		<updated>2007-11-08T00:47:19Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 15: Player data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            fast reload (opcode 0331) &lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  23    byte            unknown(health)&lt;br /&gt;
  24    byte            max armor (opcode 055F)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1369</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1369"/>
		<updated>2007-11-07T23:40:55Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 23: Gang wars */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gang wars (opcode 0879)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1368</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1368"/>
		<updated>2007-11-07T23:35:45Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 23: Gang wars */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x0069  byte[3]   (Align)&lt;br /&gt;
 0x006C  dword     current town (island) (used when a replay playback is started/finished)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0091  byte[3]   (Align)&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     number of the frames processed from the beginning of the game&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
This block contains information about map zones in three arrays. The first array is for size and location information for the zones as initially defined in the data file [[Zone|info.zon]]. The second array contains entries for each of the uniquely-named zones defined in the first array and stores information about things like gang densities and [[popcycle.dat]] group info for each zone. Much of this info is set by specific opcodes such as [[076C]], [[076A]], [[0767]], and [[0874]].) The ID number for a given entry in the first array refers to an entry in the second array. The third array is another size/location array similar to the first but based on the data file [[Zone|map.zon]].&lt;br /&gt;
&lt;br /&gt;
One interesting note about this block is that a small amount of corruption here causes the &amp;quot;Taxi Glitch&amp;quot; situation where the taxi mission always tells you there are no fares nearby no matter where you are. The problem is that the first entry of the first array (the '''SAN_AND''' zone describing the entire map) gets mangled and the taxi mission references that zone to pick a passenger. For more on this glitch and how to fix it, see the [http://www.gtaforums.com/index.php?showtopic=257759 GTAForums thread on it].&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       current town (island)&lt;br /&gt;
 0x0004  word        Number of entries for first ZoneInfo Array&lt;br /&gt;
 0x0006  word        Number of entries for ZonePop Array&lt;br /&gt;
 0x0008  word        Number of entries for second ZoneInfo Array&lt;br /&gt;
 0x000A  ZoneInfo[]  Array populated from file data/info.zon&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZonePop[]   Array of gang density and popcycle info &lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ZoneInfo[]  Array populated from file data/map.zon&lt;br /&gt;
&lt;br /&gt;
 ZoneInfo Structure:&lt;br /&gt;
   0x00  char[8]     zone name &lt;br /&gt;
   0x08  char[8]     zone gxt key (for name displayed on-screen)&lt;br /&gt;
   0x10  word[3]     x1,y1,z1 (rounded to ints)&lt;br /&gt;
   0x16  word[3]     x2,y2,z2 (rounded to ints)&lt;br /&gt;
   0x1C  word        id&lt;br /&gt;
   0x1E  byte        type&lt;br /&gt;
   0x1F  byte        island&lt;br /&gt;
   0x20  (end)&lt;br /&gt;
&lt;br /&gt;
 ZonePop Structure:&lt;br /&gt;
   0x00  byte        Gang 0 Density (set by opcode 076C)&lt;br /&gt;
   0x01  byte        Gang 1 Density (set by opcode 076C)&lt;br /&gt;
   0x02  byte        Gang 2 Density (set by opcode 076C)&lt;br /&gt;
   0x03  byte        Gang 3 Density (set by opcode 076C)&lt;br /&gt;
   0x04  byte        Gang 4 Density (set by opcode 076C)&lt;br /&gt;
   0x05  byte        Gang 5 Density (set by opcode 076C)&lt;br /&gt;
   0x06  byte        Gang 6 Density (set by opcode 076C)&lt;br /&gt;
   0x07  byte        Gang 7 Density (set by opcode 076C)&lt;br /&gt;
   0x08  byte        Gang 8 Density (set by opcode 076C)&lt;br /&gt;
   0x09  byte        Gang 9 Density (set by opcode 076C)&lt;br /&gt;
   0x0A  byte        Zone &amp;quot;Wealth&amp;quot; (set by opcode 076A)&lt;br /&gt;
   0x0B  byte[4]     RBGA color of zone on map/radar&lt;br /&gt;
   0x0F  byte        Popcycle Group (set by opcode 0767)&lt;br /&gt;
   0x10  byte        Ped-related (set by opcode 0784)&lt;br /&gt;
   0x11  (end)&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
   4    byte            enable gangwars&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||CEntranceMarker[5]||entrance markers||can be created by opcode [[0A40]]&lt;br /&gt;
{{ClassTableFooter|0x8C}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CEntranceMarker&lt;br /&gt;
{{ClassTableHeader}}&lt;br /&gt;
|0x00||dword||existance status &lt;br /&gt;
|-&lt;br /&gt;
|0x04||float[3]||position||&lt;br /&gt;
|-&lt;br /&gt;
|0x10||dword||color R||&lt;br /&gt;
|-&lt;br /&gt;
|0x14||dword||color G||&lt;br /&gt;
|-&lt;br /&gt;
|0x18||dword||color B||&lt;br /&gt;
{{ClassTableFooter|0x1C}}&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1351</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1351"/>
		<updated>2007-10-16T19:48:45Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
*0x01   used pickups?&lt;br /&gt;
*0x02   dropped jetpack?&lt;br /&gt;
*0x04   switched weapon?&lt;br /&gt;
*0x08   collected pickup?&lt;br /&gt;
*0x10   can buy property&lt;br /&gt;
*0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1344</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1344"/>
		<updated>2007-10-16T19:46:45Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
0x01   used pickups?&lt;br /&gt;
0x02   dropped jetpack?&lt;br /&gt;
0x04   switched weapon?&lt;br /&gt;
0x08   collected pickup?&lt;br /&gt;
0x10   can buy property&lt;br /&gt;
0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1343</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1343"/>
		<updated>2007-10-16T19:44:30Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Flags:&lt;br /&gt;
 0x01   used pickups?&lt;br /&gt;
 0x02   dropped jetpack?&lt;br /&gt;
 0x04   switched weapon?&lt;br /&gt;
 0x08   collected pickup?&lt;br /&gt;
 0x10   can buy property&lt;br /&gt;
 0x20   can't buy property&lt;br /&gt;
  &lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1342</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1342"/>
		<updated>2007-10-16T19:32:59Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword           unknown (timer?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1341</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1341"/>
		<updated>2007-10-16T19:30:42Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    dword(float?)   unknown (timestamp?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
	<entry>
		<id>https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1340</id>
		<title>Saves (GTA SA)</title>
		<link rel="alternate" type="text/html" href="https://gtamods.com/mediawiki/index.php?title=Saves_(GTA_SA)&amp;diff=1340"/>
		<updated>2007-10-16T19:28:48Z</updated>

		<summary type="html">&lt;p&gt;OrionSR: /* Block 6: Pickups */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
This article deals with the format of a saved game file for [[:Category:GTA SA|Grand Theft Auto: San Andreas (GTASA)]]. It is specifically geared towards the PC version(s) but much of it may be applicable to console versions too.&lt;br /&gt;
&lt;br /&gt;
==Location and Format Overview==&lt;br /&gt;
By default, GTASA places its saved game files into the folder &amp;quot;GTA San Andreas User Files&amp;quot; which is located in the current user's Documents folder. The location of this folder varies depending upon the version of Windows installed. Some typical locations for a user with an account named &amp;quot;Fred&amp;quot; would be:&lt;br /&gt;
* C:\My Documents\GTA San Andreas User Files -- Windows 98 Example&lt;br /&gt;
* C:\Documents and Settings\Fred\My Documents\GTA San Andreas User Files -- Windows XP Example&lt;br /&gt;
* C:\Users\Fred\Documents\GTA San Andreas User Files -- Windows Vista Example&lt;br /&gt;
Obviously those locations can vary based upon different Windows configurations or installation options. Note also that the executable can be modified to use a different file location through the use of a hex editor and special registry key in a process outlined at [http://www.gtaforums.com/index.php?showtopic=194371 GTAForums]&lt;br /&gt;
&lt;br /&gt;
The save files themselves are named in the format '''GTASAsfX.b''' where '''X''' represents the in-game slot number. So, the game saved in slot 1 will be stored in the save file '''GTASAsf1.b''' and the game saved in slot 5 will be stored in the save file '''GTASAsf5.b'''. There are 8 slots available in the game (1-8). GTASA save files are always 0x31800 bytes long (202,752 in decimal) and are not compressed or encoded in any way.&lt;br /&gt;
&lt;br /&gt;
==Format Details==&lt;br /&gt;
A GTASA save file consists of 28 &amp;quot;blocks&amp;quot; of data followed by some duplicated data for padding and then ending with a checksum value. Each of these elements is described below.&lt;br /&gt;
&lt;br /&gt;
===Data Blocks===&lt;br /&gt;
Each data block consists of the 5 characters '''BLOCK''' followed by a variable amount of data; in general, each block has its own unique internal format. The format descriptions in this article only deal with those internal block formats which follow the initial '''BLOCK''' identifier and all offsets start at the byte following the '''BLOCK''' identifier for the given block.&lt;br /&gt;
&lt;br /&gt;
Note that many of the blocks contain data structures. These structures are aligned along 4-byte boundaries; thus if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes present at the end of the structure which pad it to fill the remaining space. This type of gap can also occur in the middle of a structure. The convention used by this article is to mark such gaps as an array of bytes with the description '''(Align)''' .&lt;br /&gt;
&lt;br /&gt;
====Block 0: Miscellaneous====&lt;br /&gt;
Game &amp;quot;meta-information&amp;quot; giving the overall state of things. This block has a constant length of 0x138 bytes&lt;br /&gt;
 OFFSET  TYPE      DESCRIPTION&lt;br /&gt;
 0x0000  dword     version ID (checksum of a string describing the time of compilation. See note 1 below)&lt;br /&gt;
 0x0004  char[100] save name (long names are truncated on the save/load screen. See note 2 below)&lt;br /&gt;
 0x0068  byte      current mission pack&lt;br /&gt;
 0x006C  dword     current town (island)&lt;br /&gt;
 0x0070  float[3]  camera coordinates (x,y,z)&lt;br /&gt;
 0x007C  dword     length (ms) of in-game minute&lt;br /&gt;
 0x0080  dword     weather timer&lt;br /&gt;
 0x0084  byte      current in-game month&lt;br /&gt;
 0x0085  byte      current in-game month day&lt;br /&gt;
 0x0086  byte      game hour&lt;br /&gt;
 0x0087  byte      game minute&lt;br /&gt;
 0x0088  byte      weekday&lt;br /&gt;
 0x0089  byte      current in-game month (copy)&lt;br /&gt;
 0x008A  byte      current in-game month day (copy)&lt;br /&gt;
 0x008B  byte      game hour (copy)&lt;br /&gt;
 0x008C  byte      game minute (copy)&lt;br /&gt;
 0x008D  byte      time copy flag (See note 3 below)&lt;br /&gt;
 0x008E  word      (unknown) &lt;br /&gt;
 0x0090  byte      has ever cheated flag&lt;br /&gt;
 0x0094  dword     global timer&lt;br /&gt;
 0x0098  float     game speed&lt;br /&gt;
 0x009C  float     (unknown) (FPS?)&lt;br /&gt;
 0x00A0  float     tick time (time of an iteration of the major game loop)&lt;br /&gt;
 0x00A4  dword     (unknown)&lt;br /&gt;
 0x00A8  word      (unknown)&lt;br /&gt;
 0x00AA  word      (unknown)&lt;br /&gt;
 0x00AC  word      weather ID &lt;br /&gt;
 0x00B0  dword     (unknown) &lt;br /&gt;
 0x00B4  dword     (unknown)&lt;br /&gt;
 0x00B8  dword     (unknown)&lt;br /&gt;
 0x00BC  dword     vehicle camera view (opcode 09AD)&lt;br /&gt;
 0x00C0  dword     onfoot camera view&lt;br /&gt;
 0x00C4  dword     current interior&lt;br /&gt;
 0x00C8  byte      (unknown)&lt;br /&gt;
 0x00CC  dword     original interior color (?)&lt;br /&gt;
 0x00D0  byte      interior color flag (?)&lt;br /&gt;
 0x00D4  dword     (unknown)&lt;br /&gt;
 0x00D8  dword     changed interior color (?)&lt;br /&gt;
 0x00DC  dword     (unknown)&lt;br /&gt;
 0x00E0  byte      riot mode flag (opcode 06C8)&lt;br /&gt;
 0x00E1  byte      (unknown)&lt;br /&gt;
 0x00E4  dword     max wanted level&lt;br /&gt;
 0x00E8  dword     max chaos (See note 4 below)&lt;br /&gt;
 0x00EC  byte      (unknown)&lt;br /&gt;
 0x00ED  byte      is german lang (?) (opcode 040C)&lt;br /&gt;
 0x00EE  byte      (unknown)&lt;br /&gt;
 0x011C  byte      times left to display a cinematic camera help (see note 5 below)&lt;br /&gt;
 0x011E  word      SYSTEMTIME wYear&lt;br /&gt;
 0x0120  word      SYSTEMTIME wMonth&lt;br /&gt;
 0x0122  word      SYSTEMTIME wDayOfWeek&lt;br /&gt;
 0x0124  word      SYSTEMTIME wDay&lt;br /&gt;
 0x0126  word      SYSTEMTIME wHour&lt;br /&gt;
 0x0128  word      SYSTEMTIME wMinute&lt;br /&gt;
 0x012A  word      SYSTEMTIME wSecond&lt;br /&gt;
 0x012C  word      SYSTEMTIME wMilliseconds&lt;br /&gt;
 0x0130  dword     Player target marker handle (handle of the red target icon in the map menu)&lt;br /&gt;
 0x0134  byte      Boolean: the vehicle stealing help was shown (See note 6 below)&lt;br /&gt;
 0x0135  byte      Boolean: All taxis have nitro (opcode 0572 flag)&lt;br /&gt;
 0x0136  byte      Boolean: Prostitutes pay you (opcode 0A3D flag)&lt;br /&gt;
 0x0137  byte      (Align)&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Version 2.0 of GTASA will not load a save file if the Version ID String does not match its own Version ID String. Thus if a game was played on a version 1.x exe using the exact same set of mission scripts as a version 2.0 installation, the version 2.0 game will refuse to load the save unless this ID is changed. Version 1.x exes make no Version ID String check and will attempt to load any non-corrupted save. Some known Version ID String values (listed as consecutive bytes):&lt;br /&gt;
#* 0x75 0x81 0xDA 0x35 -- Version 1.00 Unmodified EXE&lt;br /&gt;
#* 0x83 0xE5 0xF3 0x65 -- Version 1.00 Modified EXE&lt;br /&gt;
#* 0x58 0xBE 0x6E 0x9A -- Version 1.01 Unmodified EXE&lt;br /&gt;
#* 0x5E 0x76 0x45 0x93 -- Version 1.01 Modified EXE&lt;br /&gt;
#* 0xF6 0x8D 0x14 0xFD -- Version 2.00 Unmodified EXE&lt;br /&gt;
# While the save name can be changed here to pretty much anything, that name will not persist the next time the game is saved, even if no missions were completed during the play session. This is because each time the game is saved this name string is reset based upon the [[GXT]] entry for the Last Mission Passed key stored in Block 15.&lt;br /&gt;
# Time copy flag shows whether the time data was saved using opcode [[0253]].&lt;br /&gt;
# Chaos is a value need to be gained to get one more star. MaxChaos is a limit for current wanted level.&lt;br /&gt;
# This is a number of how much times the cinematic camera help (about switching display modes) will be shown. Initially this value equals to 2. When it reaches zero, the help does not appear on cinematic camera enabling.&lt;br /&gt;
# This is a flag, which is set to 1 when player first time stealing a vehicle and get a help message about it, to prevent displaying this message again.&lt;br /&gt;
&lt;br /&gt;
====Block 1: Script ====&lt;br /&gt;
Information pertaining to the [[:Category:Mission_Scripting|Mission Scripts]] in use when the game was saved. Includes all global variables and information about running threads including thread pointers and local variables. A minor size difference between the MAIN section of the version 1 and version 2 scripts is the primary cause of incompatibility between version 1 and version 2 saves because it forces the other threads to be at slightly different memory locations. One can adjust the thread pointers in this block and (if converting from 1 to 2) the Version ID String from block 0 to convert a save between the two versions; this applies to either completely unmodded or identically-modded installations of v1 and v2.&lt;br /&gt;
&lt;br /&gt;
As the first section in this block can vary in size, offsets given are from the current section.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE                      DESCRIPTION&lt;br /&gt;
 0x0000  dword                     Size of Global Variable space&lt;br /&gt;
 0x0004  dword[]                   Global Variable Space -- every var is 4 bytes; the types can vary&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  ExternalScriptTrigger[70] each is 0x14 bytes in size; see details below&lt;br /&gt;
 0x0578  dword                     OnMissionFlag offset  -- address of the global variable set by opcode 0180&lt;br /&gt;
 0x057C  dword                     time when last mission was passed (when either opcode 0318 or 0595 is executed)&lt;br /&gt;
 0x0580  byte[898]                 (unknown) + main.scm parameters (missions count, main size, etc)&lt;br /&gt;
  ...&lt;br /&gt;
 0x0000  dword                     Number of Running Threads&lt;br /&gt;
 0x0004  Thread[]                  Thread structures -- each is 0x106 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 ExternalScriptTrigger&lt;br /&gt;
   0x00   word                     Index in the script.img &lt;br /&gt;
   0x02   byte                     Attach type (actor or object)&lt;br /&gt;
   0x03   byte                     Type? -- only for ObjectTrigger&lt;br /&gt;
   0x04   dword                    Status?&lt;br /&gt;
   0x08   dword                    Radius -- vary only for ObjectTrigger (ActorTrigger uses a pre-defined radius of 5.0)&lt;br /&gt;
   0x0C   word                     modelID&lt;br /&gt;
   0x0E   word                     priority&lt;br /&gt;
   0x10   dword                    (unknown)&lt;br /&gt;
   0x14                            end&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
* These triggers are created with opcodes [[0928]], [[0929]]&lt;br /&gt;
&lt;br /&gt;
 Thread Structure:&lt;br /&gt;
   0x00  word                      Index/Handle&lt;br /&gt;
   0x02  byte[224]                 Thread Memory Dump -- see details below&lt;br /&gt;
   0xE2  byte[36]                  Relative Addresses -- see details below&lt;br /&gt;
&lt;br /&gt;
 Thread Memory Dump:&lt;br /&gt;
   0x00  dword                     Next Pointer&lt;br /&gt;
   0x04  dword                     Previous Pointer&lt;br /&gt;
   0x08  char[8]                   Thread Name&lt;br /&gt;
   0X10  dword                     Absolute Base Address&lt;br /&gt;
   0x14  dword                     Absolute IP&lt;br /&gt;
   0x18  dword[8]                  Absolute Return Stack&lt;br /&gt;
   0x38  word                      Stack Pointer&lt;br /&gt;
   0x3C  dword[32]                 Local Variables&lt;br /&gt;
   0xBC  dword[2]                  Local Timers&lt;br /&gt;
   0xC4  byte                      (Unknown)&lt;br /&gt;
   0xC5  byte                      'if' statement result&lt;br /&gt;
   0xC6  byte                      (Unknown)&lt;br /&gt;
   0xC7  byte                      Is External Script&lt;br /&gt;
   0xC8  byte                      (Unknown)&lt;br /&gt;
   0xC9  byte                      (Unknown)&lt;br /&gt;
   0xCA  byte[2]                   (Align)&lt;br /&gt;
   0xCC  dword                     Wakeup Time&lt;br /&gt;
   0xD0  word                      'if' parameter&lt;br /&gt;
   0xD2  byte                      'not' flag&lt;br /&gt;
   0xD3  byte                      'wb_check' flag&lt;br /&gt;
   0xD4  byte[4]                   (Unknown)&lt;br /&gt;
   0xD8  dword                     Skip Scene Pos (opcode 0707)&lt;br /&gt;
   0xDC  byte                      Is Mission&lt;br /&gt;
   0xDD  byte[3]                   (Align)&lt;br /&gt;
   0xE0                            end&lt;br /&gt;
&lt;br /&gt;
 Relative Addresses              -- Necessary here because the absolute addresses used in-game depend on memory layout&lt;br /&gt;
   0x00  dword                      Relative IP&lt;br /&gt;
   0x04  dword[8]                   Relative Return Stack&lt;br /&gt;
&lt;br /&gt;
====Block 2: Objects ====&lt;br /&gt;
Mission-script placed objects such as doors, etc.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE       DESCRIPTION&lt;br /&gt;
 0x0000  byte[552]  (Unknown)&lt;br /&gt;
 0x0228  dword      Number of Objects&lt;br /&gt;
 0x022C  Object[]   Object structures -- each is 0x3C bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Object Structure:&lt;br /&gt;
   0x00  byte[4]    (Unknown)&lt;br /&gt;
   0x04  dword      Model ID&lt;br /&gt;
   0x08  byte[4]    (Unknown)&lt;br /&gt;
   0x0C  float[3]   Coordinates (x,y,z)&lt;br /&gt;
   0x18  byte[36]   (Unknown)&lt;br /&gt;
&lt;br /&gt;
====Block 3: Garages====&lt;br /&gt;
Information defining all garages (including bomb shops, pay &amp;amp; sprays, etc.) and also describing the cars stored in safehouse garages. This block can vary in size although in the unmodified game it will always be 0x23C7 bytes because there are 50 garages defined. The 80 saved vehicles (4 each in 20 garages) is a fixed number and probably cannot be exceeded. Also, the arrangement of the Garage Car structures in the save is non-intuitive: they follow the pattern Garage 1/Car 1, Garage 2/Car 1, ... Garage 20/Car 1, Garage 1/Car 2, Garage 2/Car 2 ...&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Garages&lt;br /&gt;
 0x0004  byte[35]      (Unknown)&lt;br /&gt;
 0x0027  GrgCar[20][4] Garage Car structures -- each is 0x40 bytes in size; see details below&lt;br /&gt;
 0x1427  Garage[]      Garage structures -- each is 0x50 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 Garage Car Structure (GrgCar):&lt;br /&gt;
   0x00  float[3]      Coordinates (x,y,z)&lt;br /&gt;
   0x0c  byte[52]      (Unknown)&lt;br /&gt;
&lt;br /&gt;
 Garage Structure:&lt;br /&gt;
   0x00  byte          Garage Type&lt;br /&gt;
   0x01  byte[3]       (Unknown) Flags&lt;br /&gt;
   0x04  float         X Coordinate for Lower Left Front&lt;br /&gt;
   0x08  float         Y Coordinate for Lower Left Front&lt;br /&gt;
   0x0c  float         Z Coordinate for Floor&lt;br /&gt;
   0x10  float[4]      Rotation (Quaternion Rx, Ry, Rz, Rw)&lt;br /&gt;
   0x20  float         Z Coordinate for Ceiling&lt;br /&gt;
   0x24  float         Width (dimension parallel to door in xy plane)&lt;br /&gt;
   0x28  float         Depth (dimension perpendicular to door in xy plane)&lt;br /&gt;
   0x2c  float         Minimum X Coordinate&lt;br /&gt;
   0x30  float         Maximum X Coordinate&lt;br /&gt;
   0x34  float         Minimum Y Coordinate&lt;br /&gt;
   0x38  float         Maximum Y Coordinate&lt;br /&gt;
   0x3c  float         (Unknown)&lt;br /&gt;
   0x40  float         (Unknown)&lt;br /&gt;
   0x44  char[8]       Garage Name -- can be used by mission script to access garage&lt;br /&gt;
   0x4c  word          (Unknown) Possibly Original Type&lt;br /&gt;
&lt;br /&gt;
====Block 4: (Unknown)====&lt;br /&gt;
Unknown data. Block can vary in size depending on number of entries; number of entries may be zero.&lt;br /&gt;
&lt;br /&gt;
 OFFSET  TYPE          DESCRIPTION&lt;br /&gt;
 0x0000  dword         Number of Entries&lt;br /&gt;
 0x0004  byte[7]      (Unknown)&lt;br /&gt;
 0x000b  Blk4Entry[]   Entry structures -- each is 0x10 bytes in size; details unknown&lt;br /&gt;
&lt;br /&gt;
====Block 5: Disabled Pathnode Cubes====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries&lt;br /&gt;
   &lt;br /&gt;
 Entry structure:&lt;br /&gt;
   0    float[6]        x1,x2,y1,y2,z1,z2&lt;br /&gt;
  18    byte[4]         bools that somehow indicate which pathtypes are enabled&lt;br /&gt;
  1c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 6: Pickups====&lt;br /&gt;
&lt;br /&gt;
 0x0000   Pickup[620]     Pickups&lt;br /&gt;
 0x4D80   word            Number of pickups being picked up (up to 20)&lt;br /&gt;
 0x4D82   byte            Weapon pickup message counter (see note 1 below)&lt;br /&gt;
 0x4D83   dword[20]       Pickups being picked up (they don't exist, but could be checked by opcode [[0214]]&lt;br /&gt;
 0x4DD3                   end&lt;br /&gt;
&lt;br /&gt;
 Pickup structure:&lt;br /&gt;
   0    float           current asset value&lt;br /&gt;
   8    dword           ammo (or max asset value)&lt;br /&gt;
   c    float           unknown (timestamp?)&lt;br /&gt;
  10    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
  16    word            asset rate&lt;br /&gt;
  18    word            model&lt;br /&gt;
  1a    word            unknown (handle?)&lt;br /&gt;
  1c    byte            type&lt;br /&gt;
  1d    byte            unknown (flags?)&lt;br /&gt;
  20                    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# When you walk across over a weapon pickup having a weapon of same type, the game will propose you to replace this slot with new weapon by pressing Action key. Initially number of this message showing times equals to 10. Each time you see the message, this counter is decreased. This field stores how much times left to display the message.&lt;br /&gt;
&lt;br /&gt;
====Block 7: (Unused)====&lt;br /&gt;
  (Usually empty)&lt;br /&gt;
&lt;br /&gt;
====Block 8: Restart Locations====&lt;br /&gt;
 ---- wasted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- busted:&lt;br /&gt;
   0    word            count&lt;br /&gt;
   2                    restart structures&lt;br /&gt;
 ---- unknown things:&lt;br /&gt;
   0                    some bytes, floats, and dwords&lt;br /&gt;
  37                    end&lt;br /&gt;
 &lt;br /&gt;
 Restart structure:&lt;br /&gt;
   0    float[3]        coords&lt;br /&gt;
   c    float           heading&lt;br /&gt;
  10    dword           island&lt;br /&gt;
  14                    end&lt;br /&gt;
&lt;br /&gt;
====Block 9: Radar Blips====&lt;br /&gt;
   0    Blip[175]       blips&lt;br /&gt;
&lt;br /&gt;
 Blip structure:&lt;br /&gt;
   8    float[3]        coords&lt;br /&gt;
  28                    end&lt;br /&gt;
&lt;br /&gt;
====Block 10: Zones====&lt;br /&gt;
&lt;br /&gt;
   4    word            count for first array&lt;br /&gt;
   6    word            count for second array&lt;br /&gt;
   8    word            count for third array&lt;br /&gt;
   a                    end&lt;br /&gt;
 ---- the three arrays:&lt;br /&gt;
 See structure descriptions below.&lt;br /&gt;
 First = info.zon, third = map.zon.&lt;br /&gt;
 ---- unknown:&lt;br /&gt;
  68                    end&lt;br /&gt;
&lt;br /&gt;
 First and third array structure:&lt;br /&gt;
   0    char[8]         zone name&lt;br /&gt;
   8    char[8]         zone group name&lt;br /&gt;
  10    word[6]         x1,y1,z1,x2,y2,z2 (rounded to ints)&lt;br /&gt;
  1c    word            id&lt;br /&gt;
  1e    byte            type&lt;br /&gt;
  1f    byte            island&lt;br /&gt;
  20                    end&lt;br /&gt;
 &lt;br /&gt;
 Second array structure:&lt;br /&gt;
  11                    end&lt;br /&gt;
&lt;br /&gt;
====Block 11: Gang weapons====&lt;br /&gt;
 0   byte   unused&lt;br /&gt;
 4   dword  weaponID A&lt;br /&gt;
 8   dword  weaponID B&lt;br /&gt;
 0c  dword  weaponID C&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Blocks count 10&amp;lt;br&amp;gt;&lt;br /&gt;
# Data can be changed by opcode 0237&lt;br /&gt;
&lt;br /&gt;
====Block 12: Car Generators====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   6                    car generators&lt;br /&gt;
 ---- numberplates:&lt;br /&gt;
   0    dword           num entries used&lt;br /&gt;
   4    Numplate[15]    number plates&lt;br /&gt;
  f4                    end&lt;br /&gt;
&lt;br /&gt;
 Car generator structure:&lt;br /&gt;
   0    word            handle (0..499)&lt;br /&gt;
   2    word            model&lt;br /&gt;
   4    byte[2]         colors&lt;br /&gt;
   6    word[3]         x,y,z, all multiplied by 8&lt;br /&gt;
   c    byte            heading/360*256&lt;br /&gt;
   d    byte            alarm chance&lt;br /&gt;
   e    byte            locked chance&lt;br /&gt;
   f    byte            flags: bit 2=force spawn, bit 8=player owned&lt;br /&gt;
  12    word            monetary value&lt;br /&gt;
  16    dword           timer&lt;br /&gt;
  1c    word            cars to generate&lt;br /&gt;
  22                    end&lt;br /&gt;
   &lt;br /&gt;
 Numplate structure:&lt;br /&gt;
   0    dword           car generator handle&lt;br /&gt;
   4    char[8]         numberplate string&lt;br /&gt;
  10                    end&lt;br /&gt;
&lt;br /&gt;
====Block 13: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 14: (Unused)====&lt;br /&gt;
 (Usually Empty)&lt;br /&gt;
&lt;br /&gt;
====Block 15: Player data====&lt;br /&gt;
  00    dword           size of block (always 28h)&lt;br /&gt;
  04    dword           money&lt;br /&gt;
  08    word            (unknown)&lt;br /&gt;
  0A    byte            is wasted_or_busted flag&lt;br /&gt;
  0C    dword           (unknown)&lt;br /&gt;
  10    dword           amount of money shown on screen&lt;br /&gt;
  ...&lt;br /&gt;
  20    byte            infinite run (opcode 0330)&lt;br /&gt;
  21    byte            (unknown)&lt;br /&gt;
  22    byte            fireproof (055D)&lt;br /&gt;
  ...&lt;br /&gt;
  2c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 16: Stats====&lt;br /&gt;
   0    float[82]       float stats (numbered 0..81 in scm)&lt;br /&gt;
 148    dword[223]      int stats (numbered 120..342 in scm)&lt;br /&gt;
 4c4    dword[32]&lt;br /&gt;
 544    char[8]         last mission passed (gxt key)&lt;br /&gt;
 54c    byte[56]&lt;br /&gt;
 584    dword[100]&lt;br /&gt;
 714    byte[128]&lt;br /&gt;
 794                    end&lt;br /&gt;
&lt;br /&gt;
====Block 17: Police trigger zones====&lt;br /&gt;
 OFFSET  TYPE                   DESCRIPTION&lt;br /&gt;
 0x0000  dword                  Number of Police trigger zones &lt;br /&gt;
 0x0004  PoliceTriggerZone[210] Trigger structures -- each is 0x20 bytes in size; see details below&lt;br /&gt;
 0x1A44                         end&lt;br /&gt;
&lt;br /&gt;
 PoliceTriggerZone&lt;br /&gt;
   0x0000  dword                trigger last activation time&lt;br /&gt;
   0x0004  word[2]              player vehicle zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0008  word[2]              player vehicle zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x000C  word[2]              police vehicle 1 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0010  word[2]              police vehicle 1 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0014  word[2]              police vehicle 2 zone point 1 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x0018  word[2]              police vehicle 2 zone point 2 (x,y) -- all multiplied by 8&lt;br /&gt;
   0x001C  byte                 type -- unknown meaning, various requirements for the trigger to be activated&lt;br /&gt;
   0x001D  byte[3]              (align)&lt;br /&gt;
   0x0020                       end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Police trigger zone is a special zone consisting of 3 rectangles. When player drive into the first rectangle (defined by 2 ends of the rectange diagonal set by the first 2 XY pairs) having a certain wanted level (depends on the 'type' field), two police cars appear there: one in the second rectangle, the second car in the third rectangle. These rectangles are defined in the same manner as the player's one.&lt;br /&gt;
# Trigger zone can be created using opcode [[04F8]]&lt;br /&gt;
# Trigger zone is activated only once per 40 seconds (the first field is used to control this).&lt;br /&gt;
# http://www.gtaforums.com/index.php?showtopic=260803&lt;br /&gt;
&lt;br /&gt;
====Block 18: Models====&lt;br /&gt;
 66cc                    end&lt;br /&gt;
&lt;br /&gt;
====Block 19: Ped Acquaintances====&lt;br /&gt;
 OFFSET  TYPE                       DESCRIPTION&lt;br /&gt;
 0x000   PedAcquaintance[32]        PedAcquaintance structures, each is 20 bytes in size -- see details below&lt;br /&gt;
 0x280   end&lt;br /&gt;
&lt;br /&gt;
 PedAcquaintance -- See notes below&lt;br /&gt;
   0x00  dword    respect bitmask&lt;br /&gt;
   0x04  dword    like bitmask&lt;br /&gt;
   0x08  dword    (unused)&lt;br /&gt;
   0x0C  dword    dislike bitmask&lt;br /&gt;
   0x10  dword    hate bitmask&lt;br /&gt;
&lt;br /&gt;
* This structure stores information about how a ped of given pedtype (each entry in PedAcquaintance[32] is separate pedtype, starting from 0 (PLAYER1) to 31 (MISSION8)) behaves toward any ped of other type. Five dwords in this structure (only four of them are used) are the bitmasks, where a bit sets a flag of acquaintance type (respect, like, dislike, hate) to the pedtype of given index (=number of bit). Say, if the 4th bit (counting from zero) in PedAcquaintance[5].respect is set, it means that a ped of type CIVFEMALE (pedtype=5) respects a ped of type CIVMALE (pedtype=4).&lt;br /&gt;
* These structures are filled with data from the file [[ped.dat]]. The acquaintances flags could be changed via scripts (using opcode [[0746]] and similar).&lt;br /&gt;
&lt;br /&gt;
====Block 20: Tags====&lt;br /&gt;
   0    dword           total number of the tags &lt;br /&gt;
   4    byte[]          tags paint status (0-255)&lt;br /&gt;
&lt;br /&gt;
====Block 21: IPL====&lt;br /&gt;
   0    dword&lt;br /&gt;
   4    byte[255]&lt;br /&gt;
 103                    end&lt;br /&gt;
&lt;br /&gt;
====Block 22: Shopping====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    entries (8 bytes each)&lt;br /&gt;
 ----&lt;br /&gt;
   0    dword           size&lt;br /&gt;
   4                    bytes&lt;br /&gt;
&lt;br /&gt;
====Block 23: Gang wars====&lt;br /&gt;
   0    dword           size of block (always 58h)&lt;br /&gt;
  5c                    end&lt;br /&gt;
&lt;br /&gt;
====Block 24: Unique Stunt Jumps====&lt;br /&gt;
 OFFSET  TYPE        DESCRIPTION&lt;br /&gt;
 0x0000  dword       Number of Unique Stunt Jumps (USJ)&lt;br /&gt;
 0x0004  StuntJump[] Jump structures -- each is 0x44 bytes in size; see details below&lt;br /&gt;
&lt;br /&gt;
 StuntJump -- See note below&lt;br /&gt;
   0x00  float[3]    Start zone point 1 (x,y,z)&lt;br /&gt;
   0x0C  float[3]    Start zone point 2 (x,y,z)&lt;br /&gt;
   0x18  float[3]    Land zone point 1 (x,y,z)&lt;br /&gt;
   0x24  float[3]    Land zone point 2 (x,y,z)&lt;br /&gt;
   0x30  float[3]    Camera coordinates (x,y,z)&lt;br /&gt;
   0x3C  dword       Reward amount (can be negative)&lt;br /&gt;
   0x40  byte        Boolean: is USJ done&lt;br /&gt;
   0x41  byte        Boolean: is USJ found&lt;br /&gt;
   0x42  byte[2]     (Align)&lt;br /&gt;
&lt;br /&gt;
The starting and landing zones are cubes; each is defined by 2 points -- point 1 is the lower, left, front of the cube and point 2 is the upper, right, rear. These cubes are aligned with the coordinate axes and not rotated at all. If a vehicle enters the starting zone while airborne, the USJ triggers (and is marked as 'found'); if the vehicle then lands inside the landing zone, the USJ is successful (and is marked as 'done') and the reward is given.&lt;br /&gt;
&lt;br /&gt;
====Block 25: ENEX Connections====&lt;br /&gt;
   0    dword           count&lt;br /&gt;
   4                    array of words&lt;br /&gt;
 ----&lt;br /&gt;
   Structure:&lt;br /&gt;
   0    word            source id&lt;br /&gt;
   2    word            flags&lt;br /&gt;
   4    word            destination id&lt;br /&gt;
 ----&lt;br /&gt;
 Followed by a weird array:&lt;br /&gt;
 1. Read a word.&lt;br /&gt;
 2. If it is -1, you've reached the end of this block.&lt;br /&gt;
 3. Otherwise, it's an index. Read two more words for this entry and go back to 1.&lt;br /&gt;
&lt;br /&gt;
====Block 26: Missions data====&lt;br /&gt;
   0    Structure[14]&lt;br /&gt;
 ee0    byte[28]&lt;br /&gt;
 efc                    end&lt;br /&gt;
&lt;br /&gt;
 Structure:&lt;br /&gt;
   0    byte[20]&lt;br /&gt;
  14    dword[8]&lt;br /&gt;
  34    dword[40]&lt;br /&gt;
  d4    dword[15]&lt;br /&gt;
 110                    end&lt;br /&gt;
&lt;br /&gt;
====Block 27: Entrance markers====&lt;br /&gt;
  00    CEntranceMarker[5]     see details below&lt;br /&gt;
  8C    end&lt;br /&gt;
&lt;br /&gt;
 CEntranceMarker&lt;br /&gt;
  00    dword                  existance status &lt;br /&gt;
  04    float[3]               position&lt;br /&gt;
  10    dword                  color R&lt;br /&gt;
  14    dword                  color G&lt;br /&gt;
  18    dword                  color B&lt;br /&gt;
  1C    end&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* markers can be created by opcode 0A40&lt;br /&gt;
&lt;br /&gt;
===Padding===&lt;br /&gt;
Following the last data block is a variable amount of padding. Since every save file is exactly 0x31800 bytes in length this padding is necessary to fill the space between the data blocks which start the file and the checksum value which ends it. Because GTASA internally uses a buffer of 0xC800 bytes for writing a save, each byte of padding data is simply a repetition of the data located 0xC800 bytes before it. While it is not strictly necessary to follow this convention for the padding when writing a modified save file, it is consistent with the original game and makes modifications harder to detect.&lt;br /&gt;
&lt;br /&gt;
===Checksum===&lt;br /&gt;
The final four bytes of a save file are an unsigned integer checksum value. This checksum is simply the sum of all the preceding 0x317FC bytes. If the checksum value does not match the calculated sum of those bytes, the game will consider the save file to be &amp;quot;corrupted&amp;quot; and refuse to load it. Thus, any time you make any changes to a save file you must remember to update the checksum when you are finished.&lt;br /&gt;
&lt;br /&gt;
[[Category:Save Formats]] [[Category:GTA SA]]&lt;/div&gt;</summary>
		<author><name>OrionSR</name></author>
		
	</entry>
</feed>