#201 Re: Sanny Builder и CLEO » CLEO для GTA Vice City » 03-11-2012 09:58

Возвращаясь к вопросу о 05EE, кто подскажет, где ошибка то?

.text:100021C5 sub_100021C5    proc near               ; DATA XREF: sub_100029ED+1F8o
.text:100021C5
.text:100021C5 arg_0           = dword ptr  8
.text:100021C5
.text:100021C5                 push    ebp
.text:100021C6                 mov     ebp, esp
.text:100021C8                 mov     ecx, [ebp+arg_0]
.text:100021CB                 push    1
.text:100021CD                 call    sub_100015A1
.text:100021D2                 mov     eax, Src
.text:100021D7                 push    dword ptr [eax]
.text:100021D9                 xor     ecx, ecx
.text:100021DB                 call    dword_100047FC
.text:100021E1                 xor     ecx, ecx
.text:100021E3                 test    al, al
.text:100021E5                 setnz   cl
.text:100021E8                 push    ecx
.text:100021E9                 mov     ecx, [ebp+arg_0]
.text:100021EC                 call    sub_100016CD
.text:100021F1                 xor     eax, eax
.text:100021F3                 pop     ebp
.text:100021F4                 retn    4
.text:100021F4 sub_100021C5    endp

int __stdcall sub_100021C5(int a1)
{
  char v2; // al@1

  sub_100015A1(a1, 1);
  v2 = dword_100047FC(0, *(_DWORD *)Src);
  sub_100016CD(a1, v2 != 0);
  return 0;
}

#202 Re: Вопросы по скриптингу » Один вопрос » 31-10-2012 20:22

Так а разве вайс сити поддерживает массивы?

Массивы поддерживаются играми SA и LCS, VCS.

Синтаксис:

San Andreas:
<имя массива>(<имя индексной переменной>,<размер><тип>)

Liberty City Stories, Vice City Stories:
<имя массива>(<имя индексной переменной>,<размер>)

#203 Re: Модификации » [SA/VC|REL] Автосейв » 12-09-2012 00:52

Я таки доделал рестарт миссии, вроде как работает.
http://sannybuilder.com/forums/viewtopi … 998#p21998

#204 Re: Модификации » [SA/VC|REL] Автосейв » 02-08-2012 13:45

@DK22Pac - Да, пока только для СА, но может сделаю и для 3/VC, посмотрим.
Вот кстати, что я так и не понял, у меня почему-то код

while true
    wait 0
if and
 $ONMISSION == 1
 31@ == 1
 then
здесь к примеру показ текст бокса

при загрузке сейва показывал этот самый текст бокс, хотя $ONMISSION то вроде не 1 должен быть. Почему и добавил фейдинг и катсцену в проверку.

#205 Re: Модификации » [SA/VC|REL] Автосейв » 02-08-2012 11:21

http://youtu.be/Vh26B1d85WM
Собственно, поиграв в GTA 3 на ios, решил доделать фичу рестарта миссии. Код внедрен в скрипт автосейва, так что тут два в одном.

Обновлено 10,09,2012:

{$CLEO}
var
20@ : Integer
21@ : Integer
end
0000:
wait 500
   // 0652: 20@ = integer_stat 147
   31@ = 1
0A8D: 25@ = read_memory 0x618FA0 size 4 virtual_protect 1 
0A8D: 26@ = read_memory 0x618FA4 size 1 virtual_protect 1
1@ = 0
0A9F: 0@ = current_thread_pointer
0A8E: 10@ = 0@ + 0x10
0A8D: 10@ = read_memory 10@ size 4 virtual_protect 0
0A8F: 11@ = 10@ - @lbl
0A8C: write_memory 0x00469E2C size 4 value 11@ virtual_protect 1
0@ += 0x40 // 0@ = 1@'s global address; fixed 02/10/10
11@ += 2
0A8C: write_memory 11@ size 4 value 0@ virtual_protect 0

while true
    wait 0
if and
 $ONMISSION == 1
 016B:   fading 
 06B9:   cutscene_data_loaded 
 31@ == 1
 then
0AB1: call_scm_func @__LabelToOffset 1 label @label store_to 15@
0AB1: call_scm_func @__LabelToOffset 1 label @money store_to 16@
0AB1: call_scm_func @__LabelToOffset 1 label @armour store_to 17@
0AB1: call_scm_func @__LabelToOffset 1 label @health store_to 18@
0AB1: call_scm_func @__LabelToOffset 1 label @playerpos store_to 19@
0AB1: call_scm_func @__getwpns 1 15@
0AB1: call_scm_func @__getmoneyarmourhealth 3 16@ 17@ 18@
0AB1: call_scm_func @__getplayerpos 1 19@
    0652: 20@ = integer_stat 147
    31@ = 0
end   
    if
        1@ == 1
    then
        while true
            wait 0
            0652: 21@ = integer_stat 147  
            if and
                $ONMISSION == 0
                not Actor.Driving($PLAYER_ACTOR)
                21@ > 20@  
            then
                Break
            else

0A8D: 29@ = read_memory 0xBAACC0 size 2 virtual_protect 0
if and
                //076F:   text_priority_displayed
                29@ == 0x727E
                $ONMISSION == 0
                21@ == 20@
then
            wait 500
0A0E: disable_text_with_style 1
03F0: enable_text_draw 1 
00BC: show_text_highpriority GXT '_RESTAR' time 1000 flag 1  
0A8C: write_memory 0x53BF8A size 2 value 0x9090 virtual_protect 1  
0A8C: write_memory 0x53BF96 size 4 value 0x90909090 virtual_protect 1  
0A8C: write_memory 0x53BF9A size 2 value 0x9090 virtual_protect 1  
0A8C: write_memory 0x58FCC2 size 4 value 0x90909090 virtual_protect 1  
0A8C: write_memory 0x58D4BE size 4 value 0x90909090 virtual_protect 1  
0A8C: write_memory 0x58D4C2 size 4 value 0x90909090 virtual_protect 1  
0A8C: write_memory 0xB7CB49 size 1 value 1 virtual_protect 0      

while true
wait 0
if
00E1:   player 0 pressed_key 10 //N 
then
0A8C: write_memory 0xB7CB49 size 1 value 0 virtual_protect 0  // Unfreeze
0A8C: write_memory 0x53BF8A size 2 value 0xC084 virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x53BF96 size 4 value 0x0298850F virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x53BF9A size 2 value 0x0 virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x58FCC2 size 4 value 0x4D75C084 virtual_protect 1  // Disable frozen game text draw
0A8C: write_memory 0x58D4BE size 4 value 0x850FC084 virtual_protect 1  // Disable frozen game texture draw
0A8C: write_memory 0x58D4C2 size 4 value 0x000000AF virtual_protect 1  // Disable frozen game texture draw    
        for 22@ = 1 to 35 step 1
        0A8C: write_memory 15@ size 4 value 0x00 virtual_protect 1
        15@ += 4
        end
break
end

if
00E1:   player 0 pressed_key 11 //Y 
then
048F: actor $PLAYER_ACTOR remove_weapons
0A8C: write_memory 0xB7CB49 size 1 value 0 virtual_protect 0  // Unfreeze
0A8C: write_memory 0x53BF8A size 2 value 0xC084 virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x53BF96 size 4 value 0x0298850F virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x53BF9A size 2 value 0x0 virtual_protect 1  // Disable frozen game stuff
0A8C: write_memory 0x58FCC2 size 4 value 0x4D75C084 virtual_protect 1  // Disable frozen game text draw
0A8C: write_memory 0x58D4BE size 4 value 0x850FC084 virtual_protect 1  // Disable frozen game texture draw
0A8C: write_memory 0x58D4C2 size 4 value 0x000000AF virtual_protect 1  // Disable frozen game texture draw  

while true 
wait 0
if and
03EE:   player $PLAYER_CHAR controllable
816B:   not fading  
then
Break
end
end
   
0AB1: call_scm_func @__LabelToOffset 1 label @label store_to 15@
0AB1: call_scm_func @__LabelToOffset 1 label @money store_to 16@
0AB1: call_scm_func @__LabelToOffset 1 label @armour store_to 17@
0AB1: call_scm_func @__LabelToOffset 1 label @health store_to 18@
0AB1: call_scm_func @__LabelToOffset 1 label @playerpos store_to 19@
0AB1: call_scm_func @__givewpns 1 15@
0AB1: call_scm_func @__givemoneyarmourhealth 3 16@ 17@ 18@
        for 22@ = 1 to 35 step 1
        0A8C: write_memory 15@ size 4 value 0x00 virtual_protect 1
        15@ += 4
        end
0AB1: call_scm_func @__putplayeratpos 1 19@ 
break
end
end
end    //end else
jump @here  
            end
        end  
0A8C: write_memory 0x618FA0 size 4 value 0x90909090 virtual_protect 1 
0A8C: write_memory 0x618FA4 size 1 value 0x90 virtual_protect 1   
wait 1       
0AA5: call 0x619060 num_params 1 pop 0 7 
wait 2 
0A8C: write_memory 0x618FA0 size 4 value 25@ virtual_protect 1 
0A8C: write_memory 0x618FA4 size 1 value 26@ virtual_protect 1  
:here
 31@ = 1        
    //    0ACE: show_formatted_text_box "SAVE OK"
        1@ = 0
    end
end

:lbl
hex
    C705 00000000 01000000  // MOV DWORD PTR DS:[00000000], 1
    B8 9B9A4600             // MOV EAX,00469A9B
    FFE0                    // JMP EAX
end

:label
hex
00 00 00 00   //slot 
00 00 00 00   //ammo for that weapon
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
end

:money
hex
00 00 00 00
end
:health
hex
00 00 00 00
end
:armour
hex
00 00 00 00
end
:playerpos
hex
00 00 00 00
00 00 00 00
00 00 00 00
end


:__LabelToOffset //0AB1: call_scm_func @__LabelToOffset 1 label @qqq4 store_to 15@
if
    0@ == 0
then
    0AB2: ret 1 0
end     
0A9F: 1@ = current_thread_pointer
1@ += 0x10 
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 // baseIP
0062: 1@ -= 0@ // label address
0AB2: ret 1 1@

:__getwpns
0085: 14@ = 0@
    0A96: 15@ = actor $PLAYER_ACTOR struct
    15@ += 0x5A0
        for 13@ = 1 to 13 step 1  
        0A8D: 21@ = read_memory 15@ size 4 virtual_protect 1 //slot x
        15@ += 0xC                               
        0A8D: 1@ = read_memory 15@ size 4 virtual_protect 1 //ammo for that weapon
        15@ += -0xC
        0A8C: write_memory 14@ size 4 value 21@ virtual_protect 1  //write slot x
        14@ += 4
        0A8C: write_memory 14@ size 4 value 1@ virtual_protect 1  //write ammo
        14@ += 4
        15@ += 0x1C
        end 
0AB2: ret 0

:__givewpns
0085: 14@ = 0@
        for 12@ = 1 to 13 step 1
        0A8D: 3@ = read_memory 14@ size 4 virtual_protect 1  // weapon id
        14@ += 0x4
        0A8D: 4@ = read_memory 14@ size 4 virtual_protect 1  //ammo
        14@ += -0x4
                  if
                  3@ <> 0
                  then
                  0AA7: call_function 0x454AC0 num_params 1 pop 1 3@ 5@    //weapon id to model id
                  0247: request_model 5@
                  038B: load_requested_models
                  while 8248: not  model 5@ available 
                  wait 0
                  end
                  01B2: give_player $PLAYER_ACTOR weapon 3@ ammo 4@ // Load the weapon model before using this
                  0249: release_model 5@ 
                  6@ = 1
                  end
        14@ += 0x8
        end
0AB2: ret 0

:__getmoneyarmourhealth
//offsets 0@ - money 1@ - armour 2@ - health
0A8D: 9@ = read_memory 0xB7CE50 size 4 virtual_protect 0
0A8C: write_memory 0@ size 4 value 9@ virtual_protect 0

0A8D: 10@ = read_memory 0xB6F5F0 size 4 virtual_protect 0
10@ += 0x548
0A8D: 11@ = read_memory 10@ size 4 virtual_protect 0 
0A8C: write_memory 1@ size 4 value 11@ virtual_protect 0
10@ += -0x8 
0A8D: 12@ = read_memory 10@ size 4 virtual_protect 0
0A8C: write_memory 2@ size 4 value 12@ virtual_protect 0
0AB2: ret 0

:__givemoneyarmourhealth
//0@ - money 1@ - armour 2@ - health
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
0A8D: 2@ = read_memory 2@ size 4 virtual_protect 0
0A8C: write_memory 0xB7CE50 size 4 value 0@ virtual_protect 0
0A8D: 10@ = read_memory 0xB6F5F0 size 4 virtual_protect 0
10@ += 0x548
0A8C: write_memory 10@ size 4 value 1@ virtual_protect 1
10@ += -0x8 
0A8C: write_memory 10@ size 4 value 2@ virtual_protect 0
0AB2: ret 0

:__getplayerpos
00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 0 
0@ += 0x4
0A8C: write_memory 0@ size 4 value 2@ virtual_protect 0
0@ += 0x4
0A8C: write_memory 0@ size 4 value 3@ virtual_protect 0
0AB2: ret 0

:__putplayeratpos
0A8D: 1@ = read_memory 0@ size 4 virtual_protect 0
0@ += 0x4
0A8D: 2@ = read_memory 0@ size 4 virtual_protect 0
0@ += 0x4
0A8D: 3@ = read_memory 0@ size 4 virtual_protect 0
if
80DF:  not actor $PLAYER_ACTOR driving 
then
select_interior 0
04FA: reset_interior 0 colors
057E: set_radar_grey 0
0860: link_actor $PLAYER_ACTOR to_interior 0
Actor.PutAt($PLAYER_ACTOR, 1@, 2@, 3@)
else
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 1@ 2@ 3@
end
0AB2: ret 0

http://www.gtagarage.com/mods/show.php?id=14143

#206 Re: Модификации » Универсальные поворотники [CLEO4/SA/REL] » 16-07-2012 21:14

Фух, я конечно уже многое позабыл за год, но вроде как постепенно начинаю вливаться в скриптинг опять.
Последняя версия поворотников, адаптированная под клео 3(управление клавишами A и D, как в первой мафии):

{$CLEO}  // убраны опкоды 0B10, 0B15. Добавлена проверка <> 0xFFFF
hex
  02 00 01 @code 00
end

:Variables
hex
   00 00 00 00
   00 00 00 00  // 34@
   00 00 00 00  // 35@
   00 00 00 00  // 36@
   00 00 00 00  // 37@
   00 00 00 00  // 38@
   00 00 00 00  // 39@
   00 00 00 00  // 40@
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00 //50
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00 //55
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00  //60
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00  //65
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
   00 00 00 00
end

:code
0A9F: 0@ = current_thread_pointer
0A8E: 1@ = 0@ + 0x10
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0
000E: 1@ -= @Variables
000A: 0@ += 0xC4
0A8F: 31@ = 1@ - 0@
0016: 31@ /= 4
const
    0_VehicleHandle = 0@
    0_VehicleStruct = 1@
    0_TractorStruct = 2@
        0_PointAdress = 2@
            0_Adress = 2@
                0_VectorPointer = 2@
    0_PrewPathPointID = 3@  // массив ИД точек
    0_CurrPathPointID = 4@
    0_NextPathPointID = 5@
    0_CarX = 6@
        0_PrewX = 6@            // массив X координат точек
            0_FrontLightX = 6@
    0_CarY = 7@
        0_CurrX = 7@
            0_FrontLightY = 7@
    0_CarZ = 8@
        0_NextX = 8@
            0_FrontLightZ = 8@
    0_CarCamDistForw = 9@
        0_PrewY = 9@           // массив Y координат точек
            0_BackLightX = 9@
    0_CarCamDistBack = 10@
        0_CurrY = 10@
            0_BackLightY = 10@
    0_NextY = 11@
        0_BackLightZ = 11@
    0_CamX = 35@(31@,1i)
    0_CamY = 13@
    0_CamZ = 14@
    0_CurrentCarOfPlayer = 15@
        0_VehicleType = 15@
    0_OldCarOfPlayer = 16@
    0_StatusOfPlayerCar = 17@
    0_CamTargetMirrorX = 18@    
    0_CamTargetMirrorY = 19@    
    0_CamTargetMirrorZ = 20@    
    0_CamTargetX = 21@    
    0_CamTargetY = 22@    
    0_CamTargetZ = 23@
    0_CarDriver = 24@
    0_UnicalNumberOfCorona = 25@
    0_LightsStatus = 26@
    0_Angle1 = 27@
    0_Angle2 = 28@

    // 31@
    
    1_RadiusOfSearch = 200.0 // радиус поиска транспорта, м
    
    // Режимы:
    1_Left = 1
    1_Right = 2
    1_Both = 3
end
0_OldCarOfPlayer = -1
while true
    wait 0
    
    if
        not player.defined($player_char)
    then
        continue
    end 

    if
        32@ > 1000
    then
        32@ = 0
    end
    
    if and
        actor.Driving($PLAYER_ACTOR)
        84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle
        84A7:   not actor $PLAYER_ACTOR driving_boat 
        89AE:   not actor $PLAYER_ACTOR driving_train
        not actor.DrivingVehicleType($PLAYER_ACTOR #BMX)
        not actor.DrivingVehicleType($PLAYER_ACTOR #BIKE)
        not actor.DrivingVehicleType($PLAYER_ACTOR #MTBIKE)
    then    
        03C0: 0_CurrentCarOfPlayer = actor $PLAYER_ACTOR car
        046C: 0_CarDriver = car 0_CurrentCarOfPlayer driver
        if 
            003B:   0_CarDriver == $PLAYER_ACTOR // (int) 
        then
            if
                803B:   not  0_CurrentCarOfPlayer == 0_OldCarOfPlayer // (int)      
            then
                0_StatusOfPlayerCar = 0
                0085: 0_OldCarOfPlayer = 0_CurrentCarOfPlayer // (int) 
            end


           
if and
33@ >= 0
   0AB0:  key_pressed 65 // A
   8AB0: not key_pressed 68 // D
then
   33@ = -2000
end
if and
   33@ > -1800
   33@ < 0
then
   0_StatusOfPlayerCar = 1_Left
   33@ = 0
end
             
if and
33@ >= -2000
0AB0:  key_pressed 68 // D
8AB0: not key_pressed 65 // A
then
   33@ = -4000
end
if and
   33@ > -3800
   33@ < -2000
then
   0_StatusOfPlayerCar = 1_Right
   33@ = 0
end

if and
   0_StatusOfPlayerCar <> 0
8AB0: not key_pressed 65 // A
8AB0: not key_pressed 68 // D
then  
   0_StatusOfPlayerCar = 0         
end   

if and
0_StatusOfPlayerCar == 1_Left
8AB0: not key_pressed 65 // A
   0AB0:  key_pressed 68 // D
then  
   0_StatusOfPlayerCar = 0     
end

if and
0_StatusOfPlayerCar == 1_Right
   0AB0:  key_pressed 65 // A
   8AB0: not key_pressed 68 // D
then  
   0_StatusOfPlayerCar = 0
end   

if and
0AB0:  key_pressed 68 // D
0AB0:  key_pressed 65 // A
then 
  0_StatusOfPlayerCar = 1_Both          
end  
   
         {   if
                0AB0:  key_pressed 90 // Z
            then
                0_StatusOfPlayerCar = 1_Left 
            else
                if
                    0AB0:  key_pressed 88 // X
                then
                    0_StatusOfPlayerCar = 1_Both 
                else
                    if
                        0AB0:  key_pressed 67 // C
                    then
                        0_StatusOfPlayerCar = 1_Right
                    else
                        if
                            0AB0:  key_pressed 16 // Shift
                        then
                            0_StatusOfPlayerCar = 0
                        end 
                    end                    
                end        
            end    }
        end // CJ -driver          
    end  // actor driving 

    068D: get_camera_position_to 0_CamTargetMirrorX 0_CamTargetMirrorY 0_CamTargetMirrorZ              
    068E: get_camera_target_point_to 0_CamTargetX 0_CamTargetY 0_CamTargetZ  
    0063: 0_CamTargetX -= 0_CamTargetMirrorX // (float) 
    0063: 0_CamTargetY -= 0_CamTargetMirrorY // (float) 
    0063: 0_CamTargetZ -= 0_CamTargetMirrorZ // (float) 
    0063: 0_CamTargetMirrorX -= 0_CamTargetX // (float) 
    0063: 0_CamTargetMirrorY -= 0_CamTargetY // (float) 
    0063: 0_CamTargetMirrorZ -= 0_CamTargetZ // (float)
    068D: get_camera_position_to 0_CamX 0_CamY 0_CamZ
    068E: get_camera_target_point_to 0_CamTargetX 0_CamTargetY 0_CamTargetZ
    
    0A9F: 0_UnicalNumberOfCorona = current_thread_pointer

0A8D: 12@ = read_memory 0xB74494 size 4 virtual_protect 1
000A: 12@ += 0x4
0A8D: 12@ = read_memory 12@ size 4 virtual_protect 1
for 29@ = 0 to 27904 step 0x100
       0A8D: 0_VehicleHandle = read_memory 12@ size 1 virtual_protect 1
       000A: 12@ += 0x1
       
       if and
       0029:   0_VehicleHandle >= 0x00 
       001B:   0x80 > 0_VehicleHandle
       then 
           005A: 0_VehicleHandle += 29@ // (int)
           if
           056E: (check) car 0_VehicleHandle defined
           then
            
            if and
            8119:   not car 0_VehicleHandle wrecked 
            01AF:   car 0_VehicleHandle sphere 0 in_sphere 0_CamX 0_CamY 0_CamZ radius 1_RadiusOfSearch 1_RadiusOfSearch 1_RadiusOfSearch
            then
            0A97: 0_VehicleStruct = car 0_VehicleHandle struct
            0A8E: 0_VehicleType = 0_VehicleStruct + 1424 // int
            0A8D: 0_VehicleType = read_memory 0_VehicleType size 1 virtual_protect 0
            
            if and
                0_VehicleType <> 0
                0_VehicleType <> 9
            then
                continue
            end
            0AA8: call_function_method 0x6D1080 struct 0_VehicleStruct num_params 0 pop 0 0_VehicleType // _CVehicleBase__getVehicleType
            
            if and
                0_VehicleType <> 1
                0_VehicleType <> 2
            then
                continue
            end            
            0A8E: 0_TractorStruct = 0_VehicleStruct + 0x4C4 // int
            0A8D: 0_TractorStruct = read_memory 0_TractorStruct size 4 virtual_protect 0
            car.StorePos(0_VehicleHandle 0_CarX 0_CarY 0_CarZ)
            050A: 0_CarCamDistBack = distance_between_XYZ 0_CarX 0_CarY 0_CarZ and_XYZ 0_CamTargetMirrorX 0_CamTargetMirrorY 0_CamTargetMirrorZ 
            050A: 0_CarCamDistForw = distance_between_XYZ 0_CarX 0_CarY 0_CarZ and_XYZ 0_CamTargetX 0_CamTargetY 0_CamTargetZ           
            if or
                0025:   0_CarCamDistForw > 0_CarCamDistBack // (float) 
                0_TractorStruct > 0
                0137:  car 0_VehicleHandle model == #BMX 
                0137:  car 0_VehicleHandle model == #BIKE 
                0137:  car 0_VehicleHandle model == #MTBIKE 
                0686:   car 0_VehicleHandle attached  
            then                    
                continue
            end
            046C: 0_CarDriver = car 0_VehicleHandle driver
            if and
                803B:   not  0_VehicleHandle == 0_OldCarOfPlayer // (int)  
                0_CarDriver <= 0
            then
                continue
            end    
            if
                32@ <= 500
            then
                gosub @Turn_signals_process
            end   
           end 
       end
end 
    end    
end

:__LabelToOffset
if
    0@ == 0
then
    0AB2: ret 1 0
end     
0A9F: 1@ = current_thread_pointer
1@ += 0x10 
0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 // baseIP
0062: 1@ -= 0@ // label address
0AB2: ret 1 1@


:__VarToOffset
0A9F: 23@ = current_thread_pointer
23@ += 0x3C
0@ *= 4
005A: 23@ += 0@ // address of the local variable 
0AB2: ret 1 23@

:Turn_signals_process    
if
    003B:   0_VehicleHandle == 0_OldCarOfPlayer // (int) 
then
    0085: 0_LightsStatus = 0_StatusOfPlayerCar // (int) 
    gosub @Get_lights_coords
    if or
        0_LightsStatus == 1_Right
        0_LightsStatus == 1_Both
    then
        //0AC7: 0_VectorPointer = var 0_FrontLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 6 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
        //0AC7: 0_VectorPointer = var 0_BackLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
    end
    if or
        0_LightsStatus == 1_Left
        0_LightsStatus == 1_Both
    then
        0_BackLightX *= -1.0
        0_FrontLightX *= -1.0
        //0AC7: 0_VectorPointer = var 0_FrontLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 6 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
        //0AC7: 0_VectorPointer = var 0_BackLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
    end        
else
    0_LightsStatus = 0
    0A8E: 0_NextPathPointID = 0_VehicleStruct + 0x3A6 // int   НОМЕР СЛЕДУЮЩЕЙ ТОЧКИ ПУТИ      0x3A6
    0A8E: 0_CurrPathPointID = 0_VehicleStruct + 0x3A4 // int   НОМЕР ТЕКУЩЕЙ ТОЧКИ ПУТИ         0x3A4
    0A8E: 0_PrewPathPointID = 0_VehicleStruct + 0x3A8 // int   НОМЕР ПРЕДЫДУЩЕЙ ТОЧКИ ПУТИ     0x3A8
    0A8D: 0_CurrPathPointID = read_memory 0_CurrPathPointID size 2 virtual_protect 0
    0A8D: 0_NextPathPointID = read_memory 0_NextPathPointID size 2 virtual_protect 0
    0A8D: 0_PrewPathPointID = read_memory 0_PrewPathPointID size 2 virtual_protect 0
    if
        0_CurrPathPointID <> 0xFFFF
    then
        for 31@ = 0 to 2
            if
                3@(31@,3i) <> 0xFFFF
            then    
                0085: 0_PointAdress = 3@(31@,3i) // (int) 
                
                //0AC6: 30@ = label @SHR_0Ah offset
                0AB1: call_scm_func @__LabelToOffset 1 label @SHR_0Ah store_to 30@
                0AA8: call_function_method 30@ struct 3@(31@,3i) num_params 0 pop 0 3@(31@,3i)
             //   0B15: 3@(31@,3i) = 3@(31@,3i) SHR 0xA   ////////////////////////////////////////////////////////////
             
                3@(31@,3i) *= 4
                3@(31@,3i) += 0x96F854
                0A8D: 3@(31@,3i) = read_memory 3@(31@,3i) size 4 virtual_protect 0
                    
                if
                    3@(31@,3i) <> 0
                then
                    0085: 3@(31@,3i) = 0_PointAdress // (int)
    
                    //0AC6: 30@ = label @AND_3FFh offset
                    0AB1: call_scm_func @__LabelToOffset 1 label @AND_3FFh store_to 30@
                    0AA8: call_function_method 30@ struct 0_PointAdress num_params 0 pop 0 0_PointAdress               
                 //   0B10: 0_PointAdress = 0_PointAdress AND 0x3FF ///////////////////////////////////////////////////
                   
                    0_PointAdress *= 0xE
                    
                    //0AC6: 30@ = label @SHR_0Ah offset
                    0AB1: call_scm_func @__LabelToOffset 1 label @SHR_0Ah store_to 30@
                    0AA8: call_function_method 30@ struct 3@(31@,3i) num_params 0 pop 0 3@(31@,3i)                
                  //  0B15: 3@(31@,3i) = 3@(31@,3i) SHR 0xA ///////////////////////////////////////////////////////////
                   
                    3@(31@,3i) *= 4
                    3@(31@,3i) += 0x96F974
                    0A8D: 3@(31@,3i) = read_memory 3@(31@,3i) size 4 virtual_protect 0
                    005A: 0_PointAdress += 3@(31@,3i) // (int) 
                            
                    0085: 6@(31@,3i) = 0_PointAdress // (int)
                    0A8E: 9@(31@,3i) = 0_PointAdress + 2 // int 
                            
                    0A8D: 6@(31@,3i) = read_memory 6@(31@,3i) size 2 virtual_protect 0
                    if
                        6@(31@,3i) >= 0x8000 // negative word
                    then
                        6@(31@,3i) += 0xFFFF0000 // convert to negative dword
                    end 
                    0093: 6@(31@,3i) = integer 6@(31@,3i) to_float 
                    6@(31@,3f) /= 8.0
                            
                    0A8D: 9@(31@,3i) = read_memory 9@(31@,3i) size 2 virtual_protect 0
                    if
                        9@(31@,3i) >= 0x8000 // negative word
                    then
                        9@(31@,3i) += 0xFFFF0000 // convert to negative dword
                    end 
                    0093: 9@(31@,3i) = integer 9@(31@,3i) to_float 
                    9@(31@,3f) /= 8.0   
                end
            else
                6@(31@,3i) = 0.0
                9@(31@,3i) = 0.0
            end // <> 0xFFFF          
        end   // for end  
    
        0063: 0_NextX -= 0_CurrX // (float) 
        0063: 0_NextY -= 0_CurrY // (float) 
        0063: 0_CurrX -= 0_PrewX // (float)
        0063: 0_CurrY -= 0_PrewY // (float) 
     
        0604: get_Z_angle_for_point 0_NextX 0_NextY store_to 0_Angle1 
        0604: get_Z_angle_for_point 0_CurrX 0_CurrY store_to 0_Angle2 
        0063: 0_Angle1 -= 0_Angle2 // (float)
        0656: get_angle 0_Angle1 absolute_degrees_to 0_Angle1 
        if and
            0_Angle1 >= 30.0
            0_Angle1 < 180.0
        then
            0_LightsStatus = 1_Left
        else
            if and
                0_Angle1 <= 330.0
                0_Angle1 > 180.0
            then
                0_LightsStatus = 1_Right
            else
                0_LightsStatus = 0
            end
        end   // LightsStatus
        gosub @Get_lights_coords
        if
            0_LightsStatus == 1_Right
        then
            //0AC7: 0_VectorPointer = var 0_FrontLightX offset
            0AB1: call_scm_func @__VarToOffset 1 varnumber 6 result 0_VectorPointer
            0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
            0_UnicalNumberOfCorona += 1
            //0AC7: 0_VectorPointer = var 0_BackLightX offset
            0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
            0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
            0_UnicalNumberOfCorona += 1
        end
        if 
            0_LightsStatus == 1_Left
        then
            0_BackLightX *= -1.0
            0_FrontLightX *= -1.0
            //0AC7: 0_VectorPointer = var 0_FrontLightX offset
            0AB1: call_scm_func @__VarToOffset 1 varnumber 6 result 0_VectorPointer
            0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
            0_UnicalNumberOfCorona += 1
            //0AC7: 0_VectorPointer = var 0_BackLightX offset
            0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
            0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
            0_UnicalNumberOfCorona += 1
        end        
    end   // FFFF    3A4     
end 

0_VehicleStruct += 0x4C8 
0A8D: 0_VehicleStruct = read_memory 0_VehicleStruct size 4 virtual_protect 0
if
    0_VehicleStruct > 0
then
    gosub @Get_lights_coords
    if or
        0_LightsStatus == 1_Right
        0_LightsStatus == 1_Both
    then
        //0AC7: 0_VectorPointer = var 0_BackLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
    end
    if or
        0_LightsStatus == 1_Left
        0_LightsStatus == 1_Both
    then
        0_BackLightX *= -1.0
        //0AC7: 0_VectorPointer = var 0_BackLightX offset
        0AB1: call_scm_func @__VarToOffset 1 varnumber 9 result 0_VectorPointer
        0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 50.0 0 penetration 0.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona
        0_UnicalNumberOfCorona += 1
    end    
end
  
return

:Get_lights_coords
0A8E: 0_Adress = 0_VehicleStruct + 0x22 // int 
0A8D: 0_Adress = read_memory 0_Adress size 2 virtual_protect 0 //model index
0_Adress *= 4
0_Adress += 0xA9B0C8
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //CModel
0_Adress += 0x5C                                        
0A8D: 0_Adress = read_memory 0_Adress size 4 virtual_protect 0 //vehicle struct
0A8D: 0_FrontLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_FrontLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_FrontLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
0_Adress += 4
0A8D: 0_BackLightX = read_memory 0_Adress size 4 virtual_protect 0 //x offset
0_Adress += 4
0A8D: 0_BackLightY = read_memory 0_Adress size 4 virtual_protect 0 //y offset
0_Adress += 4
0A8D: 0_BackLightZ = read_memory 0_Adress size 4 virtual_protect 0 //z offset
if
    0_FrontLightX == 0.0
then
    0_FrontLightX = 0.15
end
if
    0_BackLightX == 0.0
then
    0_BackLightX = 0.15
end
return

:SHR_0Ah
hex
    C1 E9 0A          // shr ecx, 0xA
    89 C8             // mov eax, ecx
    C3                // retn
end

:AND_3FFh
hex
    81 E1 FF 03 00 00 // and ecx, 0x3FF
    89 C8             // mov eax, ecx
    C3                // retn
end
// 0AA5: 0x6FC580 21 21 1 0 attach_corona_flash_inertia 15.0 0 penetration 1.5 0 0 0 0 0 flare 0 type 0 range_of_visibility 150.0 radius 0.3 with_offsets 0_VectorPointer intensity 255 blue 0 green 128 red 255 to_physical 0_VehicleStruct unical_number 0_UnicalNumberOfCorona

#207 Re: Модификации » [SA] Outlined subtitles » 08-06-2012 11:16

Ничем помочь не могу, домой только через месяц.

#208 Re: Модификации » Универсальные поворотники [CLEO4/SA/REL] » 06-01-2012 12:13

Круто, как всегда. Жаль увидеть все это вживую смогу только через полгода.

#209 Re: Модификации » Универсальные поворотники [CLEO4/SA/REL] » 18-11-2011 19:52

Офигеть, и зачем я только в армию пошёл. В следующем июле задолбаюсь новые моды искать и качать, не говоря уж про анонс GTA V, о котором я только сегодня узнал. Надеюсь, вторая версия клео3-совместима, а то придется адаптировать с клео4, или какое там клео щас у вас последнее grin

#210 Re: Справочная информация » Адреса и функции gta_vc.exe 1.0 » 03-07-2011 21:48

Поковырялся немножко, получилось убрать чёрные полосы во время катсцен, добавить тень к субтитрам и немного видоизменить текстбокс:

{$CLEO}
0000:
//fading process
05DF: write_memory 0x4A61EE size 4 value 0x90909090 virtual_protect 1
05DF: write_memory 0x4A61F2 size 1 value 0x90 virtual_protect 1
05DF: write_memory 0x46FD9D size 4 value 0x0067E184 virtual_protect 1
05DF: write_memory 0x46FDAB size 4 value 0x0067E184 virtual_protect 1
05DF: write_memory 0x46FDB1 size 4 value 0x0068D110 virtual_protect 1
05DF: write_memory 0x46FDDA size 4 value 0x0067E184 virtual_protect 1
05DF: write_memory 0x46FDEE size 4 value 0x0067E184 virtual_protect 1
05DF: write_memory 0x46FDF4 size 4 value 0x0068D110 virtual_protect 1

//subs
05DF: write_memory 0x55AE92 size 1 value 0x02 virtual_protect 1
05DF: write_memory 0x557249 size 5 value 0x90 virtual_protect 1

//mission text font
//05DF: write_memory 0x556FAA size 1 value 0x01 virtual_protect 1                                                                                     

//textbox
05DF: write_memory 0x55B59B size 4 value 0xFFFF4B31 virtual_protect 1 //background 
05DF: write_memory 0x55B5A0 size 4 value 0xFFFF4AEC virtual_protect 1 //enable shadow
05DF: write_memory 0x55B5A5 size 1 value 0x01 virtual_protect 1       //shadow size



05DC: end_custom_thread
{
55AEAD - subs color

#211 Re: Модификации » [VC] Fastloader » 03-07-2011 21:44

@Shag - Сделать можно, но буду ли я эти заниматься - не знаю.

#212 Re: Модификации » Выбор полы при входе в игру » 28-06-2011 21:09

@GSoris -

{$CLEO .cs} + "jump @NONAME_37 :NONAME_37" + $PANEL = create_panel + end_thread

= facepalm.gif

#213 Re: Модификации » [VC] Fastloader » 27-06-2011 09:59

Seemann wrote:

Круто, от скриптов перешел на программирование)

У меня в SA 99 .cs скриптов, при добавлении сотого игра вылетает с ошибкой при запуске, причём когда нажимаю debug, VS даже не запускается. Это был знак grin
А вообще, почему так может происходить?

#214 Re: Модификации » [VC] Fastloader » 26-06-2011 16:54

Вот как всегда, назовёшь тему с заголовком [VC], так сразу получается сделать поддержку gta3 и sa grin
Перезалил плагин, добавил поддержку gta_sa.exe 1.0us, добавил проверку на существование сейва.
В SA использовать только с фастлоадером Ryosuke, иначе работать не будет.

#215 Re: Модификации » [VC] Fastloader » 25-06-2011 21:47

И ещё один апдейт, во первых, список поддерживаемых exe:
*gta3.exe 1.0
*gta3.exe 1.1
*gta_vc.exe 1.0
*gta_vc.exe 1.1
Ну и теперь при отсутствии сейва игра не будет пытаться загружать его в цикле, если не получилось с первого раза, игра останется в меню. Качать в аттаче первого поста или здесь.

#216 Re: Модификации » [VC] Fastloader » 25-06-2011 10:45

Обновил, добавил поддержку exe 1.1.

#217 Модификации » [VC] Fastloader » 24-06-2011 17:05

Sergey81
Replies: 12

Данный asi плагин позволяет загружать сохранение игры в первом слоте, минуя главное меню игры.
Если к примеру в первом слоте сохранения нет, то игра будет в цикле пытаться его загрузить, для таких случаев запускаем игру с нажатой клавишей shift, чтобы попасть в главное меню.

#218 Re: Работа с памятью, EXE » Вопрос по памяти » 22-06-2011 20:51

Я тоже не вижу проблемы, но пара примеров работы с пулом маркеров у меня есть:
Для SA:

while true
wait 0
    for 10@ = 0xBA86F0 to 0xBAA248 step 0x28
     0A8D: 22@ = read_memory 10@ size 4 virtual_protect 0
     0A8E: 11@ = 10@ + 0x1C
        0A8D: 12@ = read_memory 11@ size 4 virtual_protect 0 //DWORD dwIconSize;
            if 
            12@ == 3
            then 
            0A8C: write_memory 11@ size 4 value 2 virtual_protect 0
            end    
    end   
end

Здесь мы устанавливаем всем маркерам с размером 3 второй размер.

Для VC:

{$CLEO .cs} 
0000: 
while true
wait 0
    for 10@ = 0x7D7D68 to 0x7D8D98 step 0x38  
        05E0: 12@ = read_memory 10@ size 2 virtual_protect 0 //DWORD dwIconSize;
            if 
            12@ == 3
            then 
            05DF: write_memory 10@ size 2 value 2 virtual_protect 0
            end    
    end   
end

Тоже самое.
Структура:
SA:

00000000 CMarker         struc ; (sizeof=0x28)
00000000 Color           dd ?
00000004 EntityHandle    dd ?
00000008 Pos             RwV3D ?
00000014 _Index          dw ?
00000016                 db ? ; undefined
00000017                 db ? ; undefined
00000018 _SphereRadius   dd ?
0000001C Size            dw ?
0000001E                 db ? ; undefined
0000001F                 db ? ; undefined
00000020 field_20        dd ?
00000024 Icon            db ?
00000025 _Flag           db ?
00000026 _RadarMode_or_EntityType db ?
00000027 field_27        db ?
00000028 CMarker         ends

VC:

00000000 CMarker         struc ; (sizeof=0x38)
00000000 field_0         dd ?
00000004 type            dd ?
00000008 entityHandle    dd ?
0000000C pos             RwV3d ?
00000018 field_18        RwV3d ?
00000024 field_24        dw ?
00000026 field_26        db ?
00000027 inUse           db ?
00000028 field_28        db ?
00000029                 db ? ; undefined
0000002A                 db ? ; undefined
0000002B                 db ? ; undefined
0000002C field_2C        dd ?
00000030 Size            dw ?
00000032 field_32        dw ?
00000034 iconID          dw ?
00000036 __padding       dw ?
00000038 CMarker         ends

#219 Re: Вопросы по скриптингу » Один вопрос » 22-06-2011 15:48

@Den_spb - Дык мопед не мой:cool: Код взят отсюда, правда сама вики сейчас не доступна. Но лично я не вижу смысла что-то менять.

#220 Re: Модификации » [III/VC CLEO] GTA IV style hud » 22-06-2011 15:43

07bc061b662e4d98827232b.png

05DF: write_memory 0x558743 size 4 value 0x67E390 virtual_protect 0              //ammo font letter size
05DF: write_memory 0x558759 size 4 value 0x69A624 virtual_protect 0              //ammo font letter size

Небольшое дополнение, для версии exe 1.0.

#221 Re: Вопросы по скриптингу » Один вопрос » 22-06-2011 11:05

@Seemann - есть вариант поменьше:

:get_obj
0A8D: 27@ = read_memory 0xB7449C size 4 virtual_protect 0
000A: 27@ += 0x4
0A8D: 27@ = read_memory 27@ size 4 virtual_protect 0
for 28@ = 0 to 89344 step 0x100
     0A8D: 26@ = read_memory 27@ size 1 virtual_protect 0
       000A: 27@ += 0x1
       if and
       0029:   26@ >= 0x00 
       001B:   0x80 > 26@
       then 
           005A: 26@ += 28@ // (int)
           if
           03CA: (check) object 26@ exists
           then                  
           end 
       end        
end
return

#222 Re: Модификации » [SA] Outlined subtitles » 20-06-2011 15:21

Исправил баг, когда буквы в текстбоксе становились чёрными.
Версия 7, качать здесь - http://www.gtagarage.com/mods/show.php?id=16439
Пришлось правда создать альтернативную функцию установки цвета шрифта, но всё получилось.

{$CLEO}
0000:
// subtitles //
0A8C: write_memory 0x58C306 size 1 value 0x01 virtual_protect 1
0A8C: write_memory 0x58C308 size 4 value 0x0018D284 virtual_protect 1

// textbox //
//0A8C: write_memory 0x0058BB2F size 1 value 0x02 virtual_protect 1 //outline size
//0A8C: write_memory 0x0058BB31 size 1 value 0x02 virtual_protect 1 //outline size
0A8C: write_memory 0x0058BA6A size 4 value 0x00863E10 virtual_protect 1 //font size 0.36
0A8C: write_memory 0x0058BA54 size 4 value 0x00858F34 virtual_protect 1 //font size 0.75                                             
0A8C: write_memory 0x0058BB33 size 4 value 0x0018DA59 virtual_protect 1                                    
0A8C: write_memory 0x0058BB37 size 1 value 0x50 virtual_protect 1                                        
0A8C: write_memory 0x0058BB39 size 4 value 0x0018DA53 virtual_protect 1 



0A9F: 0@ = current_thread_pointer
0A8E: 10@ = 0@ + 0x10
0A8D: 10@ = read_memory 10@ size 4 virtual_protect 0
0A8F: 11@ = 10@ - @TextColor
0A8F: 12@ = 11@ - 0x58BB79
//0A8D: 18@ = read_memory 0x71947B size 4 virtual_protect 0
0A8C: write_memory 0x58BB75 size 4 value 12@ virtual_protect 1                                    

{//NOP 5 bytes for white text color
0A8C: write_memory 0x0058BB74 size 1 value 0x90 virtual_protect 1                                        
0A8C: write_memory 0x0058BB75 size 4 value 0x90909090 virtual_protect 1}    

//Panels 
0A8C: write_memory 0x00580FC9 size 1 value 0x52 virtual_protect 1 //push edx
0A8C: write_memory 0x00580FCB size 4 value 0x001985C1 virtual_protect 1   //call 00719590
//0A8C: write_memory 0x580EF7 size 1 value 0x68 virtual_protect 1 //b
//0A8C: write_memory 0x580F01 size 1 value 0x26 virtual_protect 1 //g
//0A8C: write_memory 0x580F05 size 1 value 0x5C virtual_protect 1 //r
0A8C: write_memory 0x00580EF0 size 4 value 0x00000090 virtual_protect 1   //a
//0A8C: write_memory 0x00580F9B size 4 value  virtual_protect 1   //font scale
0006: 0@ = 0xBAB22C   // base
0A90: 1@ = 4 * 12   // panel text color (tbogt style)
005A: 0@ += 1@
0A8C: write_memory 0@ size 4 value 0xFF68265C virtual_protect 0   

//STATUS TEXT
0A8C: write_memory 0x0058B295 size 1 value 0x01 virtual_protect 1  //font type
//10@ = 540
//11@ = 960
0A8D: 10@ = read_memory 0x00C17048 size 4 virtual_protect 0 //1080
0A8D: 11@ = read_memory 0x00C17044 size 4 virtual_protect 0 //1920
10@ /= 2
11@ /= 2

0AB1: call_scm_func @__VarToOffset 1 varnumber 10 result 20@
0AB1: call_scm_func @__VarToOffset 1 varnumber 11 result 21@ 
0A8C: write_memory 0x0058B25C size 4 value 20@ virtual_protect 1
0A8C: write_memory 0x0058B26F size 4 value 21@ virtual_protect 1  
0A8C: write_memory 0x0058B2B9 size 1 value 0x01 virtual_protect 1  //outline size   

0A8C: write_memory 0x0058B1FA size 4 value 0x0085862C virtual_protect 1  //pos
0A8C: write_memory 0x0058B415 size 4 value 0x00858FE8 virtual_protect 1  //dist1      25.0         
0A8C: write_memory 0x0058B69B size 4 value 0x00858FE8 virtual_protect 1  //dist2      25.0    
0A8C: write_memory 0x0058B1FA size 4 value 0x0085862C virtual_protect 1  //dist3      10.0     
0A8C: write_memory 0x0058B541 size 4 value 0x0085862C virtual_protect 1  //dist4      10.0     
0A8C: write_memory 0x0058B1CA size 4 value 0x00858628 virtual_protect 1  //dist5      10.0       
 
//some hud colors
0006: 0@ = 0xBAB22C   // base
0A90: 1@ = 4 * 8   // radio text (gray)
005A: 0@ += 1@
0A8C: write_memory 0@ size 4 value 0xFFFFF844 virtual_protect 0 

0A8C: write_memory 0xBAB244 size 4 value 0xFF16A0CE virtual_protect 0   //mission text color
0A8C: write_memory 0x58D2B6 size 1 value 0x00 virtual_protect 0   //mission text font             

{0A8C: write_memory 0x58D3F4 size 1 value 0x68 virtual_protect 1 //b mission text outline
0A8C: write_memory 0x58D3F6 size 1 value 0x26 virtual_protect 1 //g  mission text outline
0A8C: write_memory 0x58D3F8 size 1 value 0x5C virtual_protect 1 //r  mission text outline}

                       
0A93:     

:__VarToOffset
0A9F: 23@ = current_thread_pointer
23@ += 0x3C
0@ *= 4
005A: 23@ += 0@ // address of the local variable 
0AB2: ret 1 23@

:TextColor
hex
D9 05 80 1A C7 00 8B 44  24 04 D8 1D 50 8B 85 00    
8B C8 A2 60 1A C7 00 88  25 61 1A C7 00 C1 E9 10
DF E0 88 0D 62 1A C7 00  88 2D 63 1A C7 00 F6 C4
05 7A 21 0F B6 C5 89 44  24 04 DB 44 24 04 D8 0D
80 1A C7 00 D8 0D 3C 9A  85 00 90 90 90 90 90 A2
63 1A C7 00 C3 90 90 90  90 90 90 90 90 90 90 90
end

#223 Re: Модификации » Сборки CLEO-скриптов для GTA III, VC, SA » 18-06-2011 07:20

А сейчас кое-что получше:
3161358587e058f076bc10846f344435.jpeg  5db987411910d68e71fcbe871ab6d92e.jpeg 

{$CLEO}
0000:
0A8C: write_memory 0x00732926 size 4 value 0x00858FD8 virtual_protect 1      //[(float)300.0000]  Vehicle LOD threshold, default: 70.0f
0A8C: write_memory 0x00732978 size 4 value 0x00858FD8 virtual_protect 1      //[(float)300.0000]   Vehicle LOD threshold, default: 70.0f
0A8C: write_memory 0x004250F0 size 4 value 0x0085AB00 virtual_protect 1      //[(float)1500.0000]  onscreen spawn range for vehicles, default: 110.0f
//0A8C: write_memory 0x00431A24 size 4 value 0x0085AB00 virtual_protect 1      //[(float)1500.0000]  unknown
//0A8C: write_memory 0x00431A7C size 4 value 0x0085AB00 virtual_protect 1      //[(float)1500.0000]  unknown
0A8C: write_memory 0x004253E3 size 4 value 0x00858EDC virtual_protect 1      //[(float)600.0000]    DespawnOffscr?
0A8C: write_memory 0x00431A24 size 4 value 0x00858B40 virtual_protect 1      //unknown 50.0

0A8C: write_memory 0x0073295E size 4 value 0x00863994 virtual_protect 1      //[(float)220.0000]   pedsDrawDistanceInstall
0A8C: write_memory 0x006120FF size 4 value 0x00858EDC virtual_protect 1      //[(float)600.0000]   ?absMaxDespawnOnscrInstall
0A8C: write_memory 0x00612128 size 4 value 0x00863994 virtual_protect 1      //[(float)220.0000]   unknown  absMaxDespawnOnscrInstall
0A8C: write_memory 0x00612142 size 4 value 0x00B6F11C virtual_protect 1      //[(float)0.9563]    unknown     
0A8C: write_memory 0x86D284 size 4 value 600.0 virtual_protect 1            // ped spawn distance
0A8C: write_memory 0x871008 size 4 value 500.0 virtual_protect 1            // spawnOffscrRingSizeInstall
0A93:

Я изучил VC.Traffic и решил поискать аналогичные адреса для SA. Вроде как что-то получилось, но надо тестить. Увеличена дистанция прорисовки машин и педов, соответственно и их лодов тоже.
PS. Скрины сделаны с немного другими значениями.

#224 Re: Модификации » Сборки CLEO-скриптов для GTA III, VC, SA » 17-06-2011 12:24

Очередная полезность, дополнение к коду из поста 35:

0A8C: write_memory 0x570E14 size 2 value 0x1DEB virtual_protect 1

Теперь у перевёрнутой машины здоровье не будет сбрасываться на ноль, чтобы можно её было перевернуть и ехать дальше.

#225 Re: Справочная информация » Адреса и функции gta_sa.exe 1.0 » 08-06-2011 20:07

@Den_spb - Ну я имел в виду всё что отстаёт под этим словом.

Board footer

Powered by FluxBB