Адреса Памяти (SA) — различия между версиями

Материал из GTAModding.ru
Перейти к: навигация, поиск
Строка 849: Строка 849:
 
* +0x22 = [word] Brake
 
* +0x22 = [word] Brake
  
==Rockets==
+
==Ракеты==
 
The rocket pool contains info on launched rockets (for example, Hydra rockets).
 
The rocket pool contains info on launched rockets (for example, Hydra rockets).
  
 
0xC891A8 - Rocket pool start. Each slot has 36 bytes of data. There are 32 elements in the pool.
 
0xC891A8 - Rocket pool start. Each slot has 36 bytes of data. There are 32 elements in the pool.
  
* +0 = [dword] Rocket type:
+
* +0 = [dword] Тип ракеты
** 16 = none
+
** 16 = нет
** 19 = normal
+
** 19 = Нормальная
** 20 = heatseeking
+
** 20 = Реагирует на тепло
** 58 = flare
+
** 58 = Светящаяся
 
* +4 = [dword] Pointer to launching vehicle
 
* +4 = [dword] Pointer to launching vehicle
* +8 = [dword] Pointer to target vehicle (when heatseeking), 0 otherwise
+
* +8 = [dword] Поинтер на нацеленную машину (когда тепловая ракета), 0 otherwise
* +16 = [byte] Does rocket exist?
+
* +16 = [byte] Ракета существует?
 
** 0 = exploded/does not exist
 
** 0 = exploded/does not exist
 
** 1 = travelling
 
** 1 = travelling

Версия 10:44, 29 августа 2009

GlobeLang.png Эта статья требует полного или частичного перевода.
Часть этой статьи написана на иностранном языке. Если вы знаете его, пожалуйста, помогите с ее переводом на русский язык.

Все адреса были найдены на Gta San andreas (GTA_SA.EXE) версии 1.0.

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.

Содержание

База Адресов Памяти

Пока без категории

  • 0xA49D54 - [dword] Таймер для миссий с автомобилями/самолетами (в ms)
  • 0xA51974 - [dword] Таймер для миссий с лодками/мотоциклами (в ms)
  • 0xA51A3C - Таймер для гонок Bloodring
  • 0xB7CE50 - [dword] Деньги
  • 0xBAA420 - Уровень разыскиваемости
  • 0x8CDEE4 - [dword] Максимальный уровень разыскиваемости
  • 0xB79038 - [dword] Сколько дней прошло в игре
  • 0xB70153 - [byte] Текущий час
  • 0xB70152 - [byte] Текущая минута
  • 0xB7014E - [byte] Текущий день недели (1 до 7)
  • 0x8CB7A5 - [byte] Текущая радиостанция - ID
  • 0xB700F0 - [dword] Текущий автомобиль - ID (из vehicle.ide) - не для мотоциклов
  • 0x863984 - [Int32] Гравитация
  • 0xB7CB84 - [dword] Глобальный таймер в ms
  • 0xB7CB64 - [float] Скорость игры в процентах
  • 0xB70158 - [dword] Таймер привязаный к погоде и времени в ms
  • 0xB7015C - [dword] Количество миллисекунд в одной игровой секунде (по умаолчанию - 1000)
  • 0xB7CEE4 - [byte/boolean] бесконечный бег
  • 0xB7CEE6 - [byte/boolean] Является ли игрок огнеупорным
  • 0x96C009 - [byte/boolean] Является ли перектаска бесплатной (paynspray)
  • 0xA444A4 - [byte/boolean] Радар серый
  • 0x8D2530 - [float] Плотность движения пешеходов
  • 0x8A5B20 - [float] Плотность движения транспортных средств
  • 0xB6F065 - [byte/boolean] Широкий экран (вид во время катсцен в миссиях, это не опция дисплея)
  • 0xA4A948 - Очки в миссий Лоурайдер (Танцы на машинах)
  • 0xA4EC20 - Очки в миниигре танцев
  • 0xB790B8 - [byte] Число фоторафий разных мест (4 bytes)
  • 0xA9AD74 - [byte] Число тегов (Tags) (4 bytes)
  • 0xB791E4 - [byte] Число подков (4 bytes)
  • 0xB791EC - [byte] Число пасхальных яиц (4 bytes)
  • 0x716642 - [float] Change solid clouds
  • 0x716655 - [float] Disable solid clouds

Note: 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.

  • 0xB79078 - [byte] Количество подброшенных в такси людей (число используется в статусах, 4 байта)
  • 0xA49C30 - [byte] Количество подброшенных в такси людей (число используется для выдачи наград игроку, 4 байта)
  • 0xB79040 - [byte] Количетво посещений сейвхаузов (4 bytes)
  • 0xA49EFC - [dword] Прогресс с Denise
  • 0xA49F00 - [dword] Прогресс с Michelle
  • 0xA49F04 - [dword] Прогресс с Helen'ой
  • 0xA49F08 - [dword] Прогресс с Barbar'ой
  • 0xA49F0C - [dword] Прогресс с Katie
  • 0xA49F10 - [dword] Прогресс с Millie

Note: 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.).

  • 0xB79108 - Number of girls dated
  • 0xB79100 - Current number of girlfriends
  • 0xB79104 - Number of disastrous dates
  • 0xB79110 - Number of successfull dates
  • 0xB79060 - Unique jumps found number
  • 0xB79064 - Unique jumps done number
  • 0xBA6774 - Цель на карте
    • 0 = Отключена
    • 1 = Включена
  • 0x86329C - List of valid command names
  • 0xC17054 - Main game window HWND
  • 0xC97C28 - IDirect3DDevice9 pointer

Статус

  • 0xB793D4 - [float] Фигура
  • 0xB793D8 - [float] Выносливость
  • 0xB793DC - [float] Мышцы
  • 0xB793E0 - [float] Здоровье
  • 0xB793E4 - [float] Сексуальность
  • 0xB79496 - [float] Pistol
  • 0xB79498 - [float] Silenced pistol
  • 0xB7949C - [float] Desert eagle
  • 0xB794A0 - [float] Shotgun
  • 0xB794A4 - [float] Sawn-off Shotgun
  • 0xB794A8 - [float] Combat Shotgun
  • 0xB794AC - [float] Machine Pistol
  • 0xB794B0 - [float] SMG
  • 0xB794B4 - [float] AK47
  • 0xB794B8 - [float] M4

HTML Файл Статусов

  • 0x8663A0 - Имя файла ( По умолчанию: 'stats.html' )
  • 0x86636C - Название файла ( По умолчанию : '<title>Grand Theft Auto San Andreas Stats</title>' )

Читы

[byte] Может быть включен (1) или выключен (0).

  • 0x969130 - Набор оружия 1
  • 0x969131 - Набор оружия 2
  • 0x969132 - Набор оружия 3
  • 0x969133 - Здоровье+Броня+250K
  • 0x969134 - Увеличить уровень розыска на 2 звезды
  • 0x969135 - Очистить уровень розыска
  • 0x969136 - Солнечная погода
  • 0x969137 - Очегь солнечная погода
  • 0x969138 - Плохая погода
  • 0x969139 - Дождевая погода
  • 0x96913A - Туманная погода
  • 0x96913B - Часы идут быстрее
  • 0x96913C - Ускорить игровой процесс
  • 0x96913D - Замедлить игровой процесс
  • 0x96913E - Peds Attack Eachother with Golfclub
  • 0x96913F - Have Bounty on Head
  • 0x969140 - Все вооружены
  • 0x969141 - Создать Rhino (Не работает)
  • 0x969142 - Создать Bloodring Banger (Не работает)
  • 0x969143 - Создать Rancher (Не работает)
  • 0x969144 - Создать Racecar A (Не работает)
  • 0x969145 - Создать Racecar B (Не работает)
  • 0x969146 - Создать Romero (Не работает)
  • 0x969147 - Создать Stretch (Не работает)
  • 0x96914A - Взорвать все машины
  • 0x96914B - Оставить от машин лишь колеса
  • 0x96914C - Лгкая управляемость тс
  • 0x96914D - Суицид
  • 0x96914E - Все светофоры зеленые
  • 0x96914F - Все водители агрессивные
  • 0x969150 - Все машины розовые
  • 0x969151 - Все машины черные
  • 0x969153 - Летающие лодки
  • 0x969154 - Толстый сиджей
  • 0x969155 - СДж максмисально накаченый
  • 0x969156 - CJ становится худым
  • 0x969157 - Элвисы повсюду
  • 0x969158 - Педы атакуют с ракетниц
  • 0x969159 - Пляжная тема
  • 0x96915A - Члены банды повсюду
  • 0x96915B - Банды контролируют улицы
  • 0x96915C - Ninja Theme
  • 0x96915D - Slut Magnet
  • 0x96915E - По улицам ездят дешевые авто
  • 0x96915F - По улицам ездят быстрые авто
  • 0x969160 - Машины могут летать
  • 0x969161 - Huge Bunny Hop
  • 0x969162 - Создать Hydra (Не работает)
  • 0x969163 - Создать Vortex Hovercraft (Не работает)
  • 0x969164 - Режим танка
  • 0x969165 - Все машины имеют нитро
  • 0x969166 - Машины летают при столкновениях
  • 0x969167 - Всегда полночь
  • 0x969168 - остановить время - Оранжевое небо
  • 0x969169 - Гроза
  • 0x96916A - Песчаная буря
  • 0x96916C - Мега-прижки
  • 0x96916D - Бесконечное здоровье
  • 0x96916E - Бесконечный воздух (под водой)
  • 0x96916F - Дать парашут
  • 0x969170 - Дать Jetpack
  • 0x969171 - Полиция вас не видит
  • 0x969172 - Шесть звезд уровня разыскиваемости
  • 0x969173 - Мега удар
  • 0x969174 - Всегда сытый
  • 0x969175 - Хаос-режим
  • 0x969176 - Funhouse Theme
  • 0x969177 - Замедлить игровой процесс
  • 0x969178 - Бесконечные патроны, без перезарядки
  • 0x969179 - Стреляешь во время езды
  • 0x96917A - Пустынный трафик
  • 0x96917B - Трафик сельской местности
  • 0x96917C - Recruit Anyone (9mm)
  • 0x96917D - Тема сельской местности
  • 0x96917E - Recruit Anyone (Rockets)
  • 0x96917F - Максимальный респект
  • 0x969180 - Максимальная сексуальность
  • 0x969181 - Максимальная выносливость
  • 0x969183 - Hitman in All Weapons
  • 0x969184 - Создать Hunter (Не работает)
  • 0x969185 - Создать Quad (Не работает)
  • 0x969186 - Создать Tanker Truck (Не работает)
  • 0x969187 - Создать Dozer (Не работает)
  • 0x969188 - Создать Stunt Plane (Не работает)
  • 0x969189 - Создать Monster (Не работает)

[dword]

  • 0x96918C - Были когда-нибудь использованы читы или нет
  • 0xBAA472 - Используются ли читы за текущий сеанс игры
  • 0xB79044 - Сколько раз были использованы читы

[byte]

  • 0x96918C - 'Чит' статус:
    • 0 = выключен
    • 1 = включен

Note: Если установлено в 1, то при сохранении вы получите предупреждения о использовании читов.

Настройки Дисплея

  • 0xBA6784 - [dword] Яркость
  • 0xBA6792 - [byte] Легенда
  • 0xBA676C - [byte] Режим радара
  • 0xBA6769 - [byte] Hud-режим
  • 0xBA678C - [byte] Субтитры
  • 0xBA6788 - [float] Дистанция прорисовки
  • 0xBA6794 - [byte] Лимитер кадров
  • 0xBA6793 - [byte] Широкий экран
  • 0xA9AE54 - [byte] Качество Visual FX
  • 0xBA680C - [byte] Mip Mapping
  • 0xBA6814 - [byte] Сглаживание:
    • 1 = 0x (off)
    • 2 = 1x
    • 3 = 2x
    • 4 = 3x
  • 0xBA6820 - [byte] Значения разрешений:
    • 11 = 640x480
    • 12 = 800x400
    • 13 = 800x600
    • 15 = 1024x768
(Зависит от графического драйвера/аппаратных средств.)

Конфигурация Звука

  • 0xBA6798 - [byte] Громкость Радио [от 0 до 64]
  • 0xBA6797 - [byte] Громкость SFX [от 0 до 64]
  • 0xBA6799 - [byte] Радио Эквалайзер
  • 0xBA6795 - [byte] Автонастройка Радио
  • 0xBA67F8 - [byte] Режим проигрования пользовательских треков:
    • 0 = радио
    • 1 = random
  • 0xBA680D - [byte] Автоматическое сканирование пользовательских треков
  • 0xBA679A - [byte] ID текущей радиостанции:
    • от 1 до 12 (ниже смотрите список радиостанций и их ID)
      • 1 = "Playback FM"
      • 2 = "K Rose"
      • 3 = "K-DST"
      • 4 = "Bounce FM"
      • 5 = "SF-UR"
      • 6 = "Radio Los Santos"
      • 7 = "Radio X"
      • 8 = "CSR 103.9"
      • 9 = "K-JAH West"
      • 10 = "Master Sounds 98.3"
      • 11 = "WCTR Talk Radio"
      • 12 = "Плеер пользовательских треков"
      • 13 = "Радио выключено"

Конфигурация Управления

  • 0xBA6818 - [byte] значения:
    • 0 = мишь + клавиатура
    • 1 = джойстик
  • 0xB6EC1C - [float] Чувствительность мыши
  • 0xC1CC02 - [byte] Управление мышой
  • 0xC1CC03 - [byte] Инверсия мыши по вертикали
  • 0xB6EC2E - REAL aiming mode offset, not menu:
    • 0 = джойстик
    • 1 = мышь + клавиатура

Другие динамические адреса памяти (не статические)

Пешеходы

Основное

  • 0xB6F5F0 - Указатель игрока (CPed)
  • 0xB7CD98 - Указатель игрока, прямое смещение на начало пула пешеходов (педов) (CPed)
  • 0xB74498 - Наибольшее количество педов (CPeds)(обычно 140)
  • 0xB74490 - Содержит указатель на указатель

Этот указатель:

  • +0 = Содержит указатель на первый элемент в пуле
  • +4 = Содержит указатель на карту байтов, которая обозначает, какие элементы используются.
  • +8 = [dword] Максимальное число элементов в пуле
  • +12 = [dword] Текущее число элементов в пуле

Каждый пед - это объект размером в 1988 (0x7C4) байт.

Для каждого педа в пуле:

В большинстве случаев вы можете использовать указатель игрока как значение CPed

  • CPed +0x14 = Указатель на структуру позиции в XYZ (и угол вращения)
    • (CPed+0x14) +0x0 to +0x2C = [dword] матрица вращения
    • (CPed+0x14) +0x30 = [dword] позиция по X-координате
    • (CPed+0x14) +0x34 = [dword] позиция по Y-координате
    • (CPed+0x14) +0x38 = [dword] позиция по Z-координате
  • CPed +0x2F = [byte] Статус размещения:
    • 0 = на улице
    • 3 = в здании
  • CPed +0x42 = [float] Специальные флаги BP/EP/FP/DP игрока (неуязвимость к выстрелам, огню и т.д).
    Сложите эти значения и запишите их сумму в +66 (0x42).
    • 1 = отключает модель коллизии педа(тоесть, пед может проходить сквозь всего) (другими словами, режим noclip)
    • 2 = замораживает педа (тоесть, пед не может двигаться)
    • 4 = иммунитет к выстрелам
    • 8 = иммунитет к огню
    • 16 = ?
    • 32 = ?
    • 64 = иммунитет к повреждениям (от столкновений и прочего)
    • 128 = иммунитет к взрывам
  • CPed +0xC0 = [dword] Указатель на ближайшую машину
  • CPed +0x15C = Некторые статусы анимации:
    • 0 = прыгает от земли
    • 61 = ударяет
    • 102 = остановился
    • 154 = спринт (бежит с ускорением)
    • 205 = бежит
  • CPed +0x46C = [byte] Проверка игрока:
    • 0 = в воздухе/воде
    • 1 = в машине
    • 2 = входит в интерьер
    • 3 = пешком
  • CPed +0x46D = Статус прыжка:
    • 32 = приземлился/ожидает
    • 33 = в машине (?)
    • 34 = в воздухе
    • 36 = приземление
  • CPed +0x46F = Статус приседания:
    • 128 = стоит
    • 132 = присел
  • CPed +0x47C = Указатель на структуру анимации
  • CPed +0x4DF = Статус проигрывания текущей анимации:
    • 0 = ничего
    • 61 = начало/остановка
    • 62 = идёт цикл
  • CPed +0x504 = [word] Muzzle flash intensity:
    • 0 to 10000 = on
    • 65536 = off
  • CPed +0x530 = [dword] Статус:
    • 0 = покидает машину, падает с байка или что-то в этом роде
    • 1 = нормальный случай
    • 50 = водит
    • 54 = игрок только-что умер (записи wasted ещё не видно)
    • 55 = погиб
    • 63 = арестован
  • CPed +0x534 = Статус бега:
    • 0 = пока водит
    • 1 = неподвижно стоит
    • 4 = начинает бежать
    • 6 = бежит
    • 7 = спринт (бежит с ускорением)
  • CPed +0x540 = [float] Здоровье
  • CPed +0x544 = [float] Максимальное здоровье
  • CPed +0x548 = [float] Броня
  • CPed +0x558 = [float] Угол игрока по Z-координате
  • CPed +0x568 = [dword] Текущая машина, с которой вы находитесь в контакте
  • CPed +0x584 = [dword] Текущий Entity (объект), с которым вы находитесь в контакте
  • CPed +0x58C = [dword] Последняя или текущая машина, которую вы водили/ведёте (CarPointer)
  • CPed +0x598 = [byte] Блокировка игрока (поставьте 1 чтобы заблокировать управление игроком, он не сможет двигаться)
  • CPed +0x5A0 = [byte] Начало информации об оружии (28 байт) (Смотрите структуры: WeaponSlot)
  • CPed +0x5D8 = [dword] Тип пистолета:
    • 22 = 9мм
    • 23 = 9мм с глушителем
    • 24 = desert eagle
  • CPed +0x5DC = [dword] Статус пистолета
  • CPed +0x5E0 = [dword] Количество патронов в обойме пистолета
  • CPed +0x5E4 = [dword] Общее количество патронов пистолета (включая обойму)
  • CPed +0x5F4 = [dword] Тип дробовика:
    • 25 = дробовик
    • 26 = обрез
    • 27 = spas-12 (боевой дробовик)
  • CPed +0x5F8 = [dword] Статус дробовика:
    • 1 = стреляет?
    • 2 = перезаряжается
  • CPed +0x5FC = [dword] Количество заряженных в дробовике патронов
  • CPed +0x600 = [dword] Общее количество патронов дробовика (включая те, что заряжены)
  • CPed +0x718 = [byte] Текущий слот оружия (1 байт)
  • CPed +0x740 = ID текущего оружия (из default.dat)
  • CPed +0x760 = [dword] Оружие, которым вы были убиты
  • CPed +0x764 = [dword] Указатель на педа, который вас убил

Структуры

WeaponSlot                 // Всего 28 байт
 DWORD       тип          // + 0
 DWORD       статус         // + 4 (0 ожидание, 1 стрельба, 2 перезарядка)
 DWORD       AmmoInClip    // + 8
 DWORD       AmmoRemaining // +12
 FLOAT       unknown       // +16 (увеличивается каждый раз при стрельбе, 0 когда оружие неактивно, 
                              возможно используется для подсчёта выстреленных пуль для перезарядки?)
 UNKNOWN     0..7 байт    // +20 (неизвестно - режим очков (ночного/термо видения), 0 - выключен и 256 - включен)...+27
WeaponSlot.type
 (Slot0: Без оружия)                   (Slot2: Handguns)
  0 - Рука                               22 - Пистолет
  1 - Кастет                             23 - Пистолет с глушителем
 (Slot1: Ручное)                         24 - Пустынный орел
  2 - Golf Club                         (Slot3: Дробовики)
  3 - Nitestick                          25 - Дробовик
  4 - Нож                                26 - Обрез
  5 - Baseball Bat                       27 - Спас-12
  6 - Shovel                            (Slot4: Полу-автоматы)
  7 - Кий                                28 - Микро Узи
  8 - Katana                             29 - МП5
  9 - Бензопила                          32 - Тек-9
  15 - Cane
 (Slot5: Автоматы)                      (Slot10: Девушкам)
  30 - AK47                              14 - Цветы
  31 - M4                               (Slot9:Специальное)
 (Slot6: Снайперки)                      42 - Огнетушитель
  33 - Снайперка                         43 - Камера
  34 - Снайперка с прицелом             (Slot11:Специальное)
 (Slot7: Тяжелое оружие)                 44 - Очки ночного видения
  35 - Ракетница                         45 - Очки теплового видения
  36 - Самонаводящая ракетница           46 - Парашут
  37 - Огнемет                          (Slot12:Детонаторы)
  38 - Миниган                           40 - Детонатор(для детонации гранаты)
 (Slot8: Projectiles)
  16 - Граната
  18 - Коктеиль Молотова
  39 - Remote Explosives
 (Не слот: Выстреленный из hunter / hydra / missile launcher)
 (Этот тип записан в пуле ракет как тип ракеты, но это продолжение этого списка)
  19 - Обычные ракеты
  20 - Самонаводящиеся ракеты
  58 - Вспышки

Cars

  • 0xB6F980 - Is the direct pointer to the pool start (CVehicle)
  • 0xB74494 - Contains a pointer

This pointer:

  • +0 = Contains a pointer to the first element in the pool
  • +4 = Contains a pointer to a byte map indicating which elements are in use
  • +8 = [dword] Is the maximum number of elements in the pool
  • +12 = [dword] Is the current number of elements in the pool

Each vehicle object is 2584 (0xA18) bytes. It starts at 0xC502AA0.

For each vehicle in the pool:

  • +20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes):
    • +0 = [float] X-axis Rotation (Grad)
    • +4 = [float] Y-axis Rotation (Grad)
    • +8 = [float] Z-axis Rotation (Grad)
    • +16 = [float] X-axis Rotation (Looking)
    • +20 = [float] Y-axis Rotation (Looking)
    • +24 = [float] Z-axis Rotation (Looking)
    • +48 = [float] X-axis Position
    • +52 = [float] Y-axis Position
    • +56 = [float] Z-axis Position
  • +34 = [word] Vehicle ID from vehicles.ide
  • +66 = [byte] Is the BP/EP/DP/DP (Special Flags) status of the car as follows:
    Add these values, and write the sum into +66
    • 1 = n/a
    • 2 = n/a
    • 4 = Защита от пуль
    • 8 = Защита от огня
    • 16 = Защита от сталкновений
    • 32 = n/a
    • 64 = n/a
    • 128 = Защита от взрывов
  • +68 = [float] X (East-West) speed
  • +72 = [float] Y (North-South) speed
  • +76 = [float] Z (Up-Down) speed
  • +80 = [float] X (NS) Spin
  • +84 = [float] Y (EW) Spin
  • +88 = [float] Z (NW) Spin

Note: 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...

(Car addresses continued:)

  • +140 = [float] Mass (kg) from handling.cfg
  • +144 = [float] Turn Mass from handling.cfg
  • +148 = [float] Grip Divider:
    • 1.0 = 1 x gGrip
    • 10.1 = 10 x gGrip
    • 100.0 = g / 100Grip
  • +152 = [float] Mass-to-Grip Multiplier. Ie. G Force when flying/during suspension/driving (acceleration towards ground)
  • +160 = [float] Normalized Grip Level
  • +164 = [float] CoM X
  • +168 = [float] CoM Y
  • +172 = [float] CoM Z
  • +1064 = [byte] Статус двигателя:
    • 0 = отключен
    • 16 = Включен
  • +1069 = [byte] Сирена включена/отключена
  • +1076 = [byte] Body Color (as in carcolors.dat, black being the 0)
  • +1077 = [byte] Stripe Color (as in carcolors.dat, black being the 0)
  • +1078 = [byte] Body Color #2
  • +1079 = [byte] Stripe Color #2
  • +1080 = [dword] modding data as in garage info (Не работает?)
  • +1084 = [dword] modding data as in garage info (Не работает?)
  • +1088 = [dword] modding data as in garage info (Не работает?)
  • +1092 = [dword] modding data as in garage info (Не работает?)
  • +1096 = [dword] modding data as in garage info (Не работает?)
  • +1100 = [dword] modding data as in garage info (Не работает?)
  • +1104 = [dword] modding data as in garage info (Не работает?)
  • +1108 = [dword] modding data as in garage info (Не работает?)
  • +1112 = [float] Размер колёс машины из vehicle.ide
  • +1116 = [dword] Time left for car alarm to sound in ms
  • +1120 = [dword] Поинтер водителя
  • +1124 = [dword] Поинтер пассажира 1 (Переднее правое сиденье)
  • +1128 = [dword] Поинтер пассажира 2 (Заднее левое сиденье)
  • +1132 = [dword] Поинтер пассажира 3 (Заднее правое сиденье)
  • +1136 = [dword] Поинтер пассажира 4 (Используется для автобусов)
  • +1140 = [dword] Поинтер пассажира 5 (Используется для автобусов)
  • +1144 = [dword] Поинтер пассажира 6 (Используется для автобусов)
  • +1148 = [dword] Поинтер пассажира 7 (Используется для автобусов)
  • +1152 = [dword] Поинтер пассажира 8 (Используется для автобусов)
  • +1156 = [dword] Поинтер пассажира 9 (Используется для автобусов)
  • +1172 = [float] Steer angle 1
  • +1176 = [float] Steer angle 2
  • +1180 = [float] Gas pedal
  • +1184 = [float] Brake pedal
  • +1192 = [byte] Статус бомбы у машины:
    • 0 = нет бомбы
    • 1 = незаряженная бомба с таймером
    • 2 = незаряженная бомба с датчиком зажигания двигателя
    • 3 = радиоуправляемая бомба
    • 4 = заряженная бомба с таймером
    • 5 = заряженная бомба с датчиком зажигания двигателя

Примечание: Радиоуправляемая бомба (3) можно только узнать, установлена она или нет. Установка значения в 3 ничего не даст.

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. SЕсли вы установили это значение на 4, то не сможете убрать бомбу.

  • +1216 = [float] Здоровье машины:
    • <250.0 = Машина горит
    • 1000.0 = Не повреждена
  • +1272 = [dword] Статус дверей машины:
    • 1 = Открыты
    • 2 = Закрыты
  • +1300 = [dword] Alternate siren (honking):
    • 0 = off
    • 1 = on
  • +1412 = [dword] Статус фар:
    • 0 = Отключены
    • 1 = Включены
  • +1424 = [byte] Тип машины:
    • 0 = машина/самолет
    • 5 = лодка
    • 6 = поезд
    • 9 = Байк
  • +1444 = [float] Train speed:
    • -0.1 = is forward
    • 0.1 = is reverse
  • +1445 = [byte] Car Tire (Left-Front) Status:
    • 0 = ok
    • 1 = flat
    • 2 = Used by planes when landing gear is up
  • +1446 = [byte] Car Tire (Left-Rear) Status:
    • 0 = ok
    • 1 = flat
    • 2 = Used by planes when landing gear is up
  • +1447 = [byte] Car Tire (Right-Front) Status:
    • 0 = ok
    • 1 = flat
    • 2 = Used by planes when landing gear is up
  • +1448 = [byte] Car Tire (Right-Rear) Status:
    • 0 = ok
    • 1 = flat
    • 2 = Used by planes when landing gear is up
  • +1628 = [byte] Bike Tire (Front) Status:
    • 0 = ok
    • 1 = flat
  • +1629 = [byte] Bike Tire (Rear) Status:
    • 0 = ok
    • 1 = flat
  • +1630 = [byte] Bicycle Tire (Front) Status:
    • 0 = ok
    • 1 = shot
  • +1631 = [byte] Bicycle Tire (Rear) Status:
    • 0 = ok
    • 1 = shot

Note: 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.

  • +1736 = [byte] Is the bike identifier. Gets set to 1 if this vehicle is a bike (or bmx)
  • +2020 = [float] Front-Left suspension height
  • +2024 = [float] Rear-Left suspension height
  • +2028 = [float] Front-Right suspension height
  • +2032 = [float] Rear-Right suspension height
  • +2276 = [float] Burn Timer (in ms)

Let's say, the Car Position of this given car starts at 0xC5F5DB4:

  • +0 = X Level to the ground
  • +4 = Y Level to the ground
  • +8 = Z Level to the ground
  • +16 = X Where am I looking
  • +20 = Y Where am I looking
  • +24 = Z Where am I looking
  • +32 = Dyn flight data
  • +36 = Dyn flight data
  • +40 = Dyn flight data
  • +48 = CarPosX
  • +52 = CarPosY
  • +56 = CarPosZ

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:

  • +1828 = Detachables1 Pos X
  • +1832 = Detachables1 Pos Y
  • +1836 = Detachables1 Pos Z
  • +1872 = Detachables2 Pos X
  • +1876 = Detachables2 Pos Y
  • +1880 = Detachables2 Pos Z
  • +1916 = Detachables3 Pos X
  • +1920 = Detachables3 Pos Y
  • +1924 = Detachables3 Pos Z
  • +1960 = Detachables4 Pos X
  • +1964 = Detachables4 Pos Y
  • +1968 = Detachables4 Pos Z

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.

Offsets for Detachables:

  • +1532 = BikeDetachPosAdr(0)
  • +1632 = BikeDetachPosAdr(1)
  • +1676 = BikeDetachPosAdr(2)
  • +1720 = BikeDetachPosAdr(3)
  • +1764 = BikeDetachPosAdr(4)
  • +1828 = CarDetachPosAdr(0)
  • +1872 = CarDetachPosAdr(1)
  • +1916 = CarDetachPosAdr(2)
  • +1960 = CarDetachPosAdr(3)

The trailer of the tanker is handled the same way as the vehicles. Its pointer gets set at offset:

  • +0x4C8

To the car object start. When warping vehicles that has trailer, we need to warp this 'vehicle' as well. The same pointer is used also when you are towing other vehicles as well.

Wanted

0xB7CD9C - Wanted pool start (CWanted). Each slot has 668 bytes of data.

  • +0x0 = Is the counter for how pissed the cops are:
    • above 50 = 1 звезда
    • above 180 = 2 звезды
    • above 550 = 3 звезды
    • above 1200 = 4 звезды
    • above 2400 = 5 звезд
    • above 4600 = 6 звезд
  • +0x2C = [dword] Текущий уровень звезд
  • +0x19 = [byte] Number of cops simultaniously shooting at you

Note: Helicopters will still shoot if you change this to 0.

Camera

  • 0xB6F028 - Camera Block Start (CCamera)
  • 0x52B730 - Start of camera 'MOVer' subroutine:
    • 0xC3 = lock camera (retn)
  • 0xB6F0DC - [dword] Current View:
    • 0 = bumper View
    • 1 = close external view
    • 2 = middle external view
    • 3 = furthest external view
    • 4 = nothing = same as last?
    • 5 = cinematic view
    • 6 to INF = same as 4?
  • 0xB6F0E0 - [float] Car View Distance (arm length)
  • 0xB6F0E8 - [float] True View Distance (true arm length)

Ignored

0xB7CD9C - Поинтер игнорирования (CIgnored).

  • +0x1E = [byte/boolean] Игрок игнорируется копами
  • +0x298 = [byte/boolean] Игрок игнорируется всеми

Pools

See the Data Pools funtions in the Function Memory Addresses (SA) section.

0x550F10 - AllocatePools function.

  • 00B74484 - PtrNode Single
  • 00B74488 - PtrNode Double
  • 00B7448C - EntryInfoNode
  • 00B74490 - Peds
  • 00B74494 - Vehicles
  • 00B74498 - Buildings
  • 00B7449C - Objects
  • 00B744A0 - Dummys
  • 00B744A4 - ColModel
  • 00B744A8 - Task
  • 00B744AC - Event
  • 00B744B0 - PointRoute
  • 00B744B4 - PatrolRoute
  • 00B744B8 - NodeRoute
  • 00B744CC - TaskAllocator
  • 00B744C0 - PedIntelligence
  • 00B744C4 - PedAttractors

Target

0xB6F3B8 = Pointer to Target.

  • +0x79C = Targetted CPed:
    • 0 = no cped targetted
  • +0xC0 = Pointer to last object (ped, car, maybe others) you collided with

Handling

0xC2B9DC - Handling Block Start. Each slot has 224 bytes of data.

  • +0x0 = [dword] Index/Identifier
  • +0x4 = fMass
  • +0x8 = 1.0 / fMass
  • +0xC = fTurnMass
  • +0x10 = fDragMult
  • +0x14 = CentreOfMass.x
  • +0x18 = CentreOfMass.y
  • +0x1C = CentreOfMass.z
  • +0x20 = [byte] nPercentSubmerged
  • +0x24 = fMass * 8.0000001e-1 / nPercentSubmerged
  • +0x28 = fTractionMultiplier
  • +0x74 = [byte] TransmissionData.nDriveType
  • +0x75 = [byte] TransmissionData.nEngineType
  • +0x76 = [byte] TransmissionData.nNumberOfGears
  • +0x7C = TransmissionData.fEngineAcceleration (Multiplied by 3.9999999e-4)
  • +0x80 = TransmissionData.fEngineInertia
  • +0x84 = TransmissionData.fMaxVelocity (Multiplied by 5.5555599e-3)
  • +0x94 = fBrakeDeceleration (Multiplied by 3.9999999e-4)
  • +0x98 = fBrakeBias
  • +0x9C = [byte] bABS
  • +0xA0 = fSteeringLock
  • +0xA4 = fTractionLoss
  • +0xA8 = fTractionBias
  • +0xAC = fSuspensionForceLevel
  • +0xB0 = fSuspensionDampingLevel
  • +0xB4 = fSuspensionHighSpdComDamp
  • +0xB8 = Suspension upper limit
  • +0xBC= Suspension lower limit
  • +0xC0 = Suspension bias between front and rear
  • +0xC4 = Suspension anti-dive multiplier
  • +0xC8 = fCollisionDamageMultiplier (multiplier not yet found)
  • +0xCC = [hex] modelFlags
  • +0xD0 = [hex] handlingFlags
  • +0xD4 = fSeatOffsetDistance
  • +0xD8 = [dword] nMonetaryValue
  • +0xDC = [byte] Front lights
  • +0xDD = [byte] Rear lights
  • +0xDE = [byte] Vehicle anim group

WEAPON.DAT

0xC8AAB8 - Начало блока, куда считывается информация об оружии с меткой J (оружие ближнего боя) и $ (остальное оружие). В этом блоке 0x50 элементов по 0x70 байт в каждом. Индекс элемента высчитывается по формуле: <номер оружия> + <смещение>. Смещение определяется навыком оружия skilllevel: STD - 0, POOR - 25, PRO - 36, особое (характеристики пистолета копов) - 47. Все имена взяты из заголовка оригинального weapon.dat.

  • +0x0 = [dword] eFireType
    • 0 - MELEE
    • 1 - INSTANT_HIT
    • 2 - PROJECTILE
    • 3 - AREA_EFFECT
    • 4 - CAMERA
    • 5 - USE
  • +0x4 = [dword] targetRange
  • +0x8 = [dword] weaponRange
  • +0xC = [dword] modelId1
  • +0x10 = [dword] modelId2
  • +0x14 = [dword] slot
  • +0x18 = [dword] flags. Изменяя флаги, убедитесь, что установленная анимационная группа поддерживает все определенные действия, иначе игра будет вылетать. Массив флагов:
    • 0 - CANAIM. Возможность целиться из оружия.
    • 1 - AIMWITHARM. Сиджей, когда целится, водит рукой.
    • 2 - 1STPERSON. Вид от первого лица при прицеливании (как у базук и снайперской винтовки).
    • 3 - ONLYFREEAIM.
    • 4 - MOVEAIM. Возможность передвигаться при прицеливании.
    • 5 - MOVEFIRE. Возможность передвигаться при стрельбе.
    • 6 - unused.
    • 7 - unused.
    • 8 - THROW.
    • 9 - HEAVY. Тяжелое оружие. Когда в руках, нельзя бегать спринтом.
    • 10 - CONTINUOUSFIRE.
    • 11 - TWIN_PISTOL. Рендерить оружие в обоих руках.
    • 12 - RELOAD. Необходимость перезарядки.
    • 13 - CROUCHFIRE. Перезарядка сидя.
    • 14 - RELOAD2START. Перезарядка сразу после выстрела (как у дробовика).
    • 15 - LONG_RELOAD.
    • 16 - SLOWSDWN.
    • 17 - RANDSPEED.
    • 18 - EXPANDS.
  • +0x1C = [dword] AssocGroupId. Некоторые анимационные группы и их идентификаторы:
    • 0 - 'default'
    • 11 - 'python'
    • 12 - 'pythonbad'
    • 13 - 'colt45'
    • 14 - 'colt_cop'
    • 15 - 'colt45pro'
    • 16 - 'sawnoff'
    • 17 - 'sawnoffpro'
    • 18 - 'silenced'
    • 19 - 'shotgun'
    • 20 - 'shotgunbad'
    • 21 - 'buddy'
    • 22 - 'buddybad'
    • 23 - 'uzi'
    • 24 - 'uzibad'
    • 25 - 'rifle'
    • 26 - 'riflebad'
    • 27 - 'sniper'
    • 28 - 'grenade'
    • 29 - 'flame'
    • 30 - 'rocket'
    • 31 - 'spraycan'
    • 32 - 'goggles'
    • 33 - 'melee_1'
    • 34 - 'melee_2'
    • 35 - 'melee_3'
    • 36 - 'melee_4'
    • 37 - 'bbbat_1'
    • 38 - 'gclub_1'
    • 39 - 'knife_1'
    • 40 - 'sword_1'
    • 41 - 'dildo_1'
    • 42 - 'flowers_1'
    • 43 - 'csaw_1'
  • +0x20 = [word] ammoClip
  • +0x22 = [word] damage
  • +0x24 = [dword] fireOffset.x
  • +0x28 = [dword] fireOffset.y
  • +0x2C = [dword] fireOffset.z
  • +0x30 = [dword] skillLevel
    • 0 - POOR
    • 1 - STD
    • 2 - PRO
    • 3 - особое
  • +0x34 = [dword] statrequired. Уровень статистики, необходимый для получения текущего навыка владения оружием.
  • +0x38 = [dword] accuracy
  • +0x3C = [dword] movementspeed
  • +0x40 = [dword] animLoop start
  • +0x44 = [dword] animLoop end
  • +0x48 = [dword] animLoop fire
  • +0x4C = [dword] animLoop2 start
  • +0x50 = [dword] animLoop2 end
  • +0x54 = [dword] animLoop2 fire
  • +0x58 = [dword] breakoutTime
  • +0x5C = [dword] Скорость
  • +0x60 = [dword] radius
  • +0x64 = [dword] lifespan
  • +0x68 = [dword] spread
  • +0x6C = [word] AlignedAnimGroupID = (11 <= AssocGroupId && AssocGroupId <= 31) ? (AssocGroupId - 11) : 0;
  • +0x6E = [byte] ComboID
    • 4 - "Руки"
    • 8 - "Бита"
    • 9 - "Нож"
    • 10 - "GOLFCLUB"
    • 11 - "Катана"
    • 12 - "Бензопила"
    • 13 - "Дилдо"
    • 14 - "Цветы"
  • +0x6F = [byte] numCombos

0xC8A8A8 - сюда считывается информация о смещениях прицела для анимационных групп (метка %). Состоит из 20 элементов по 0x18 байт в каждом. Индекс элемента - AlignedAnimGroupID из структуры выше.

  • +0x0 = [dword] AimX
  • +0x4 = [dword] AimZ
  • +0x8 = [dword] DuckX
  • +0xC = [dword] DuckZ
  • +0x10 = [word] RLoadA
  • +0x12 = [word] RLoadB
  • +0x14 = [word] CrouchRLoadA
  • +0x16 = [word] CrouchRLoadB

Controls

0xB73458 - Start of controls block.

  • +0x20 = [word] Accelerate:
    • 0 = off
    • 255 = on
  • +0x22 = [word] Brake

Ракеты

The rocket pool contains info on launched rockets (for example, Hydra rockets).

0xC891A8 - Rocket pool start. Each slot has 36 bytes of data. There are 32 elements in the pool.

  • +0 = [dword] Тип ракеты
    • 16 = нет
    • 19 = Нормальная
    • 20 = Реагирует на тепло
    • 58 = Светящаяся
  • +4 = [dword] Pointer to launching vehicle
  • +8 = [dword] Поинтер на нацеленную машину (когда тепловая ракета), 0 otherwise
  • +16 = [byte] Ракета существует?
    • 0 = exploded/does not exist
    • 1 = travelling
  • +20 = [float] X-axis position
  • +24 = [float] Y-axis position
  • +28 = [float] Z-axis position

Гоночные чекпоинты

The checkpoints block that are used in the "illegal street racing" mini-games.

0xC7F158 - Начало блока чекпоинтов. Each block is 38 bytes, but theres always only two at a time.

  • +0 = [byte] Тип чекпоинта
  • +2 = [byte] Цвет чекпоинта в RGBA
  • +4 = [float] X-axis Position
  • +8 = [float] Y-axis Position
  • +12 = [float] Z-axis Position
  • +16 to +24 = [float] Rotation Matrix (direction from this checkpoint to the next, all floats)
  • +32 = [float] Checkpoint radius

Гаражи и парковка

Note, that the memory location of garages can vary depending on the scm script you use.

There are 50 garages in the game. Each garage has:-

  • Position
  • Details
  • Usage information
  • Location in game
  • Location of door
  • Width
  • Depth
  • Height
  • Direction it looks
  • Coordinates of lower left corner
  • Coordinates of upper right corner,
  • Usable by the player
  • Which property (safe house) it belongs
  • Number of vehicles which can be parked inside
  • The door state (closed, opening, open and closing)

These are found in the garage object of 212 bytes. The memory locations where the garages start are:

  • 0x96C048 (start of first garage)
  • +0xD4 (offset for second garage - offset this much again for third garage, again for fourth, etc.)
  • 0x96C120 (start of final garage)

(Tested using non-patched original v1.0 German EXE with English language option selected, and original SCM file.)

(UZI-I Tested Player Garage and Pay'n'Spray using Hoodlum Crack EXE with an Blank SCM)

Here is the known garage offsets:

  • +0 = [float] X Coord of the Garage Lower Left corner
  • +4 = [float] Y Coord of the Garage Lower Left corner
  • +8 = [float] Z Coord of the Garage Lower Left corner
  • +12 = [float] X Value of direction vector 1
  • +16 = [float] Y Value of direction vector 1
  • +20 = [float] X Value of direction vector 2
  • +24 = [float] Y Value of direction vector 2
  • +28 = [float] Top Z Coord. of the garage
  • +32 = [float] Normalized Width of the garage
  • +36 = [float] Normalized Depth of the garage
  • +40 = [float] Left Border (X) corrdinate
  • +44 = [float] Right Border (X) corrdinate
  • +48 = [float] Front Border (Y) corrdinate
  • +52 = [float] Back Border (Y) corrdinate
  • +56 = [float] Garage Door Position
  • +60 = [dword] unknown (Timer)
  • +64 = [dword] unknown (not saved)
  • +68 = [chars] Garage Name (7 bytes + nul)
  • +76 = [byte] Garage Type
  • +77 = [byte] Garage Door State values:
    • 0 = closed
    • 1 = open
    • 2 = closing
    • 3 = opening
  • +78 = [byte] Door Flags
    • 0x01 used mod shop (?)
    • 0x02 inactive door
    • 0x04 used Pay'n'Spray (?)
    • 0x08 small door (reflective?)
    • 0x10 up and in door
    • 0x20 camera follows player
    • 0x40 door is closed flag
    • 0x80 girlfriend PnS
  • +79 = [byte] Original Type

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. Note: Direction Vectors marked above may be Quaternions.

Here are the static Addresses of the Garage Blocks, and to which garage they belong:

  • 0x96C048 - Commerce Region, Loading Bay Garage (Life's a Beach)
  • 0x96C120 - LSPD Police Impound Garage
  • 0x96C1F8 - Mission Garage near El Corona (Los Desperados)
  • 0x96C2D0 - Eight Ball Autos near El Corona
  • 0x96C3A8 - Mission Garage near El Corona (Cesar Vialpando)
  • 0x96C480 - Player Garage: El Corona
  • 0x96C558 - LS Burglary Garage near Playe del Seville
  • 0x96C630 - LowRider Tuning Garage in Willowfield
  • 0x96C708 - Pay 'n' Spray in Idlewood
  • 0x96C7E0 - Player Garage: Johnson House
  • 0x96C8B8 - Pay 'n' Spray in Temple
  • 0x96C990 - Transfender in Temple
  • 0x96CA68 - Pay 'n' Spray in Santa Maria Beach
  • 0x96CB40 - Player Garage: Santa Maria Beach
  • 0x96CC18 - Player Garage: Mulholland
  • 0x96CCF0 - Wheel Archangels in Ocean Flats
  • 0x96CDC8 - Mission Garage in Ocean Flats (T-Bone Mendez)
  • 0x96CEA0 - Player Garage: Hashbury
  • 0x96CF78 - Transfender near Wang Cars in Doherty
  • 0x96D050 - Pay 'n' Spray near Wang Cars in Doherty
  • 0x96D128 - SF Burglary Garage, Loading Bay near Doherty
  • 0x96D200 - Player Garage: Doherty
  • 0x96D2D8 - Mission Garage in Doherty Garage
  • 0x96D3B0 - Woozie's Mission Garage in Chinatown (Ran Fa Li)
  • 0x96D488 - Michelle's Pay 'n' Spray in Downtown
  • 0x96D560 - Player Garage: Calton Heights
  • 0x96D638 - SFPD Police Impound Garage
  • 0x96D710 - Pay 'n' Spray in Juniper Hollow
  • 0x96D7E8 - Player Garage: Paradiso
  • 0x96D8C0 - LVPD Police Impound Garage
  • 0x96D998 - Airport Plane Garage in Las Venturas
  • 0x96DA70 - LV Burglary Garage near Camel's Toe
  • 0x96DB48 - Pay 'n' Spray near Royal Casino
  • 0x96DC20 - Transfender in come-a-lot
  • 0x96DCF8 - Player Garage: Rockshore West
  • 0x96DDD0 - Welding Wedding Bomb-workshop in Emerald Isle
  • 0x96DEA8 - Pay 'n' Spray in Redsands East
  • 0x96DF80 - Player Garage: Redsands West
  • 0x96E058 - Player Garage: Prickle Pine
  • 0x96E130 - Player Garage: Whitewood Estates
  • 0x96E208 - Pay 'n' Spray in El Quebrados
  • 0x96E2E0 - Pay 'n' Spray in Fort Carson
  • 0x96E3B8 - Player Garage: Fort Carson
  • 0x96E490 - Player Garage: Verdant Meadows
  • 0x96E568 - Mission Garage in El Castillo del Diablo (Interdiction)
  • 0x96E640 - Airport Garage in Verdant Meadows
  • 0x96E718 - Mission Garage in Angel Pine (Puncture Wounds)
  • 0x96E7F0 - Pay 'n' Spray in Dillimore
  • 0x96E8C8 - Player Garage: Palomino Creek
  • 0x96E9A0 - Player Garage: Dillimore

Static Mem. Locations for garages:

  • 0x96ABD8 - Johnson House Car 1
  • 0x96AC18 - Johnson House Car 2
  • 0x96AC58 - Johnson House Car 3
  • 0x96AC98 - Johnson House Car 4
  • 0x96ACD8 - Santa Maria Beach Car 1
  • 0x96AD18 - Santa Maria Beach Car 2
  • 0x96AD58 - Santa Maria Beach Car 3
  • 0x96AD98 - Santa Maria Beach Car 4
  • 0x96ADD8 - Rockshore West Car 1
  • 0x96AE18 - Rockshore West Car 2
  • 0x96AE58 - Rockshore West Car 3
  • 0x96AE98 - Rockshore West Car 4
  • 0x96AED8 - Fort Carson Car 1
  • 0x96AF18 - Fort Carson Car 2
  • 0x96AF58 - Fort Carson Car 3
  • 0x96AF98 - Fort Carson Car 4
  • 0x96AFD8 - Verdant Meadows Car 1
  • 0x96B018 - Verdant Meadows Car 2
  • 0x96B058 - Verdant Meadows Car 3
  • 0x96B098 - Verdant Meadows Car 4
  • 0x96B0D8 - Dillimore Car 1
  • 0x96B118 - Dillimore Car 2
  • 0x96B158 - Dillimore Car 3
  • 0x96B198 - Dillimore Car 4
  • 0x96B1D8 - Prickle Pine Car 1
  • 0x96B218 - Prickle Pine Car 2
  • 0x96B258 - Prickle Pine Car 3
  • 0x96B298 - Prickle Pine Car 3
  • 0x96B2D8 - Whitewood Estates Car 1
  • 0x96B318 - Whitewood Estates Car 2
  • 0x96B358 - Whitewood Estates Car 3
  • 0x96B398 - Whitewood Estates Car 4
  • 0x96B3D8 - Palomino Creek Car 1
  • 0x96B418 - Palomino Creek Car 2
  • 0x96B458 - Palomino Creek Car 3
  • 0x96B498 - Palomino Creek Car 4
  • 0x96B4D8 - Redlands West Car 1
  • 0x96B518 - Redlands West Car 2
  • 0x96B558 - Redlands West Car 3
  • 0x96B598 - Redlands West Car 4
  • 0x96B5D8 - El Corona Car 1
  • 0x96B618 - El Corona Car 2
  • 0x96B658 - El Corona Car 3
  • 0x96B698 - El Corona Car 4
  • 0x96B6D8 - MulHolland Car 1
  • 0x96B718 - MulHolland Car 2
  • 0x96B758 - MulHolland Car 3
  • 0x96B798 - MulHolland Car 4
  • 0x96B7D8 - LSPD Impound Car 1
  • 0x96B818 - LSPD Impound Car 2
  • 0x96B858 - LSPD Impound Car 3
  • 0x96B898 - LSPD Impound unused
  • 0x96B8D8 - SFPD Impound Car 1
  • 0x96B918 - SFPD Impound Car 2
  • 0x96B958 - SFPD Impound Car 3
  • 0x96B998 - SFPD Impound unused
  • 0x96B9D8 - LVPD Impound Car 1
  • 0x96BA18 - LVPD Impound Car 2
  • 0x96BA58 - LVPD Impound Car 3
  • 0x96BA98 - LVPD Impound usued
  • 0x96BAD8 - Calton Heights Car 1
  • 0x96BB18 - Calton Heights Car 2
  • 0x96BB58 - Calton Heights Car 3
  • 0x96BB98 - Calton Heights Car 4
  • 0x96BBD8 - Paradiso Car 1
  • 0x96BC18 - Paradiso Car 2
  • 0x96BC58 - Paradiso Car 3
  • 0x96BC98 - Paradiso Car 4
  • 0x96BCD8 - Doherty Car 1
  • 0x96BD18 - Doherty Car 2
  • 0x96BD58 - Doherty Car 3
  • 0x96BD98 - Doherty Car 4
  • 0x96BDD8 - Hashbury Car 1
  • 0x96BE18 - Hashbury Car 2
  • 0x96BE58 - Hashbury Car 3
  • 0x96BE98 - Hashbury Car 4
  • 0x96BED8 - Verdant Meadows Airport Car 1
  • 0x96BF18 - Verdant Meadows Airport Car 2
  • 0x96BF58 - Verdant Meadows Airport Car 3
  • 0x96BF98 - Verdant Meadows Airport Car 4

Interface

  • 0xBAB22C - [byte] Health bar/red text/enemy marker/anything red color (RGBA, 4 bytes)
  • 0xBAB230 - [byte] Money font color/vehicle entry name/green text/anything green color (RGBA, 4 bytes)
  • 0xBAB238 - [byte] White text color (RGBA, 4 bytes)
  • 0xBAB240 - [byte] Main menu title border (RGBA, 4 bytes)
  • 0xBAB244 - [byte] Wanted level/yellow text color (RGBA, 4 bytes)
  • 0xBAB24C - [byte] Radio station text color (RGBA, 4 bytes)

Меню

The following addresses have been found:

0xBA6748 - Base address.

  • +0x15D = [byte] ID текущего меню
  • +0x78D = [byte] Show menu item hover
  • +0x54 = [dword] Selected menu item
  • +0xE9 = [byte] Main menu switch (startup menu/menu when playing)
  • +0x84 = [dword] Язык
  • +0x15F = [byte] Selected savegame
  • +0x24 = [dword] Режим радара
  • +0x64 = [float] Размер карты
  • +0x68 = [float] Позиция х карты
  • +0x6C = [float] Позиция у карты
  • +0x5C = [byte] Player in menu?

Menu IDs

Known Menu IDs (get ID at 0xBA68A5):

  • 0 = Stats
  • 1 = Start game
  • 2 = Brief
  • 3 = Настройки звука
  • 4 = Display settings
  • 5 = Карта
  • 6 = Вопрос начала новой игры
  • 7 = Game selection
  • 8 = Вопрос загрузки миссион пака
  • 9 = Загрузить игру
  • 10 = Удалить игру
  • 11 = Question load save game
  • 12 = Question delete game
  • 13 = Loads first savegame? *crash
  • 14 = Delete successful
  • 15 = Delete successful
  • 16 = Save game
  • 17 = Question save
  • 18 = Save successful
  • 19 = Save successful
  • 20 = Save game ok
  • 21 = Load game ok
  • 22 = Game affected, do not save
  • 23 = Display default settings
  • 24 = Audio default settings
  • 25 = Controller default settings
  • 26 = User track options
  • 28 = Language
  • 29 = Save game ok
  • 30 = Save unsuccessful
  • 31 = Load game (save unsuccessful)
  • 32 = Load unsuccessful, file corrupted
  • 33 = Options
  • 34 = Main menu
  • 35 = Quit game
  • 36 = Controller setup
  • 37 = Redefine controls
  • 38 = Foot/vehicle controls
  • 39 = Mouse settings
  • 40 = Joypad settings
  • 41 = Game running main menu
  • 42 = Quit game
  • 43 = Empty

SCM related

  • 0xA49960 - Start of the SCM block (0xA49960 + (4 * varnumber) is that particular variable)
  • 0xA7A6A0 - Start of the mission block (69000 bytes)
  • 0x464080 - GetOpcodeParameters()
  • 0xA447F4 - Command count
  • 00469F00 - CRunningScript_ProcessOneCommand
  • 0x464080 - CRunningScript_CollectParameters
  • 0x4859D0 - CRunningScript_UpdateCompareFlag
  • 0x469390 - Game_Script_Thread struct
  • 0xA43C78 - Where the routine above stores opcode parameters values. Max 16 paramters for an opcode it seems
  • 0x8A6168 - "Master" jumptable, each dword points to one of 27 different functions, each one handling approx 100 opcodes
  • 0x466C50 - Opcodes 0000 - 0063. Array of dword, each pointing to the function for that opcode
  • 0x468364 - Opcodes 0064 - 00C4. Array of dword, each pointing to the function for that opcode
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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

(Нет времени закончить сейчас, закончим позже)

Threads

0xA8B430 - Старт пула потоков. There are two queues: the active threads and inactive ones.
0xA8B42C - Поинтер к первому активному СКМ потоку.
0xA8B428 - Поинтер к первому неактивному скрипту.

Each thread has size of 224 (0xE0) bytes.

  • +0 = [void*] Pointer to the next thread in a queue
  • +4 = [void*] Pointer to the previous thread in a queue
  • +8 = [char] Thread name given by the opcode 03A4, char 8
  • +16 = [dword] Thread base IP (used in the missions and external scripts to calculate a global address of a local jump offset)
  • +20 = [dword] Current IP
  • +24 = [dword] Return stack (stores the current IP when a gosub executed, dword 8)
  • +56 = [word] Last item index of the return stack
  • +60 = [dword] Local variables array, dword 32
  • +188 = [dword] Automatically incrementing timers, dword 2
  • +196 = [boolean] Thread active flag
  • +197 = [boolean] Условие IF
  • +198 = [boolean] Mission flag
  • +199 = [boolean] External script flag
  • +200 = [boolean] Unknown flag (in menu?). Used in 03E5
  • +201 = [boolean] Unknown flag (ID of an assigned script?)
  • +204 = [dword] Wakeup time (set by 0001)
  • +208 = [word] IF number (set by 00D6)
  • +210 = [boolean] Not flag (if a condition to check is negative – any opcodes higher than 0x7FFF)
  • +211 = [boolean] Wasted or busted check enabled flag (set by 0111); only for missions
  • +212 = [boolean] Игрок задержан или убит; только для миссий
  • +216 = [dword] Skip scene IP (used by opcodes 0707, 0701)
  • +220 = [boolean] Флаг миссии

Информация о внешних скриптах

0xA47B60 – Start of the external scripts info pool. There are 82 elements with 32 bytes of size each

  • +0 = [dword] Script IP
  • +4 = [word] Status (can be obtained by 0926)
  • +6 = [word] Index in SCM (a number as defined in the scm header)
  • +8 = [char] Name, char 20
  • +28 = [dword] Размер

0xA485A0 – [dword] Размер последнего внешнего скрипта
0xA485A4 – [dword] Общее количество скриптов

Другое

0xA4892C – Start of the pool stored the flipped vehicles handles. There are 6 elements in there, with each of them:

  • +0 = [dword] Vehicle handle to check if it flipped. Stored by opcode 0190.
  • +4 = [dword] Time in ms passed from the moment a vehicle flipped. Used by opcode 018F

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:

  • +0 = [byte] Entity type:
    • 1 - vehicle
    • 2 - actor
    • 3 - object
    • 4 - particle
    • 5 – group (062F)
    • 7 – AS_origin (061D)
    • 8 - action_sequence
    • 9 - decision maker
    • 11 - searchlight
    • 13 - txd_dictionary
  • +4 = [dword] entity handle (an index in the proper pool)

Weather Codes

0xC81318 - [word] Закрепить погоду (нашел AlienX).
0xC8131C - [word] Следущая погода.
0xC81320 - [word] Текущая погода.

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.

Weather Values:

  • 0 = EXTRASUNNY_LA
  • 1 = SUNNY_LA
  • 2 = EXTRASUNNY_SMOG_LA
  • 3 = SUNNY_SMOG_LA
  • 4 = CLOUDY_LA
  • 5 = SUNNY_SF
  • 6 = EXTRASUNNY_SF
  • 7 = CLOUDY_SF
  • 8 = RAINY_SF
  • 9 = FOGGY_SF
  • 10 = SUNNY_VEGAS
  • 11 = EXTRASUNNY_VEGAS (heat waves)
  • 12 = CLOUDY_VEGAS
  • 13 = EXTRASUNNY_COUNTRYSIDE
  • 14 = SUNNY_COUNTRYSIDE
  • 15 = CLOUDY_COUNTRYSIDE
  • 16 = RAINY_COUNTRYSIDE
  • 17 = EXTRASUNNY_DESERT
  • 18 = SUNNY_DESERT
  • 19 = SANDSTORM_DESERT
  • 20 = Под водой
  • 21 = EXTRACOLOURS_1 (very dark, gradiented skyline, purple) Used for interiors?
  • 22 = EXTRACOLOURS_2 (very dark, gradiented skyline, green) Used for interiors?


The following are not mentioned in that file, make of them what you will:

  • 23 to 26 = variations of pale orange
  • 27 to 29 = variations of fresh blue
  • 30 to 32 = variations of dark, cloudy, teal
  • 33 = dark, cloudy, brown
  • 34 = blue/purple, regular
  • 35 = dull brown
  • 36 to 38 = bright, foggy, orange
  • 39 = extremely bright
  • 40 to 42 = blue/purple cloudy
  • 43 = dark toxic clouds
  • 44 = Черное/белое небо
  • 45 = black/purple sky

Warning: Setting these values to anything higher will result in things like black screen, flickering, really red, etc.

Dependencies

  • Car ptr = player ptr when on foot.

[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.]

  • CPed block size = 0x7C4 bytes.
  • CVehicle block size = 0x0A18 bytes.

External Links