GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
[EXE] - Patch - Радио EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
[EXE] - Patch - Радио EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
[EXE] - Patch - Радио EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
[EXE] - Patch - Радио EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
[EXE] - Patch - Радио EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
[EXE] - Patch - Радио EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
[EXE] - Patch - Радио EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
[EXE] - Patch - Радио EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
[EXE] - Patch - Радио EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar


You are not connected. Please login or register

[EXE] - Patch - Радио

Go down  Message [Page 1 of 1]

1[EXE] - Patch - Радио Empty [EXE] - Patch - Радио Mon Jun 22, 2009 12:41 pm

gtasbigfoot

gtasbigfoot
Admin



Позволяющий активировать радио в любой машине.

Скриншоту


Code:

while true
    wait 250
    if
        $PLAYER_CHAR.Defined
    then
        if or
            00E1:  player 0 pressed_key 8
            00E1:  player 0 pressed_key 9     
        then
            gosub @Enable
            wait 2000
        end
    end
end   
end_thread
    :Enable
    alloc($_asmproc, 77)
    alloc($_temp, 78)
    0@ = -429863
    &0(0@,1i) = 0xA49960
    &0(0@,1i) += @_GetActorStruct
    $_asmproc = 0x404910           
    0572: run_asm_inject true        // GetActorstruct
    $_temp -= 10785748
    $_temp /= 4
    0084: $_temp = &0($_temp,1i) // carstruct
    $_temp -= 10786701
    $_temp /= 4
    &0($_temp,1i) = 0
    return
    :_GetActorStruct // $_temp = actor $PLAYER_ACTOR struct^
    hex
        FF 35 6C99A400      // push $PLAYER_ACTOR
        8B 0D 9044B700      // mov ecx, @ActorsPool
        FF 15 949AA400      // call dword ptr [0xA49960+$_asmproc*4]
        A3    989AA400      // mov [$_temp], eax 
        C3                  // return 
    end
 



Значит как этим пользоваться: берете любую машину, нажимаете в ней кнопку переключения радио (next radio/prev radio). После этого выходите из нее и садитесь вновь - радио будет работать.

Проверял на версии 1.0.


Если кому-то еще интересна скриптовая реализация включения радио, вот оптимизированный вариант.


Code:

while true
    wait 250
    $PLAYER_CHAR.Defined
    jf continue
    if or
        00E1:  player 0 pressed_key 8
        00E1:  player 0 pressed_key 9     
    then
        0@ = 352231 
        008B: 0@ = &0(0@,1i) // carstruct
        0@ > 0
        jf continue
        0@ -= 10786701
        0@ /= 4
        &0(0@,1i) = 0
        wait 2000
    end
end   
end_thread


Вот код на Дельфи (Delphi) как включить радио для всех моделей.


Code:

for i := 0 to 211 do
      PByte($00860B0B + i * 36)^ := 0;



Если хотите, чтобы в полицеском байке всегда играла музыка (независимо от SCM), можно пропатчить EXE. Все, что потребуется, - это хекс-редактор (подойдет Hex Workshop, скачать в гугле) и прямые руки.

1. Сохраните EXE, на всякий случай
2. Откройте gta_sa.exe в хекс-редакторе
3. Перейдите по адресу 4588631
4. Замените байт, который там написан (3) на 0.
5. Сохраняем, загружаем. В байках появилась музыка.

Внимание! Замените, а не добавьте! Вы должны удалить 3 и написать 0. Если такого байта нет, возможно у вас другая версия. Посмотрите на скриншот, попытайтесь найти это место в своей версии сами.

Скриншоту


Там же можно патчить и другие машины.

#Copcarla - 4591259
#Copcarsf - 4591295
#Copcarvg - 4591331
#Copcarru - 4591367
#Fbiranch - 4587443
#Enforcer - 4585175
#Swatvan - 4591439


Для Ambulance соответствующий флаг находится по адресу 4584779. Процедура такая же.

Для того чтобы посчитать адрес для нужной модели машины (чтобы включить у нее радио), используйте следующую формулу:


Code:

address = 4569803 + #id * 36


Например, для пожарки адрес, который нужно патчить, равен 4569803 + (407*36) = 4584455. По этому адресу в EXE должна быть записана 3. Ее мы меняем на
0
и в пожарке появляется радио.

Оффсеты посчитаны для версии 1.0.

формула для 1.1:


Code:

address = 4580075 + #id * 36


ID модели можно узнать в файле data/vehicles.ide; или типа '#' в Sanny Builder.


Пример кода; для тех кто не знает как поставить код в main.scm.


Code:

var
  $PLAYER_CHAR : Player
  $PLAYER_ACTOR : Actor
end

03A4: name_thread 'MAIN'
01F0: set_max_wanted_level_to 6
0111: set_wasted_busted_check 0
00C0: set_current_time_hours_to 8 minutes_to 0
04E4: unknown_refresh_game_renderer_at 824.0641 -1794.895
03CB: set_rendering_origin_at 824.0641 -1794.895 13.8142
062A: change_float_stat 165 to 1000.0
062A: change_float_stat 23 to 1000.0
062A: change_float_stat 24 to 1450.0               
0053: $PLAYER_CHAR = create_player #NULL at 824.0641 -1794.895 13.8142
01F5: $PLAYER_ACTOR = get_player_actor $PLAYER_CHAR
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group
0373: set_camera_directly_behind_player
01B6: set_weather 0
0001: wait 0 ms
087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1
087B: set_player $PLAYER_CHAR clothes_texture "JEANSDENIM" model "JEANS" body_part 2
087B: set_player $PLAYER_CHAR clothes_texture "SNEAKERBINCBLK" model "SNEAKER" body_part 3
087B: set_player $PLAYER_CHAR clothes_texture "VEST" model "VEST" body_part 0
070D: rebuild_player $PLAYER_CHAR
01B4: set_player $PLAYER_CHAR can_move 1
016A: fade 1 time 0 
04BB: select_interior 0
0629: change_integer_stat 181 to 4
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0
0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here
03E6: remove_text_box
0AA5: call 0x43A0B6 1 pop 1 #CHEETAH

while true
    wait 250             
    if
        $PLAYER_CHAR.Defined
    then
        if or
            00E1:  player 0 pressed_key 8
            00E1:  player 0 pressed_key 9     
        then
            gosub @Enable
            wait 2000
        end
    end
end   
end_thread
    :Enable
    alloc($_asmproc, 77)
    alloc($_temp, 78)
    0@ = -429863
    &0(0@,1i) = 0xA49960
    &0(0@,1i) += @_GetActorStruct
    $_asmproc = 0x404910           
    0572: run_asm_inject true        // GetActorstruct
    $_temp -= 10785748
    $_temp /= 4
    0084: $_temp = &0($_temp,1i) // carstruct
    $_temp -= 10786701
    $_temp /= 4
    &0($_temp,1i) = 0
    return
    :_GetActorStruct // $_temp = actor $PLAYER_ACTOR struct^
    hex
        FF 35 6C99A400      // push $PLAYER_ACTOR
        8B 0D 9044B700      // mov ecx, @ActorsPool
        FF 15 949AA400      // call dword ptr [0xA49960+$_asmproc*4]
        A3    989AA400      // mov [$_temp], eax 
        C3                  // return 
    end



З.Ы. этот:


Code:

0AA5: call 0x0043A0B6 1 pop 1 #CHEETAH


#CHEETAH (415) - это желаемая модель машины. Все остальное (загрузку модели, расчет координат) сделает игра.

P.S. Разумеется, CLEO3 должны быть установлены.

http://gtamodding.com

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum