перепиши на lua:

// -- Mod Backfire by Junior_Djjr - juniordjjr.mixmods.com.br

{$cleo}


if 8AF0: 6@ = not get_int_from_ini_file "cleo\Backfire.ini" section "Config" key "MinVehicleValue"
then 6@ = 60000
end  
if not 4@ = audiostream.Load3D("cleo\backfire.mp3")
then
    if 8AF0: 7@ = not get_int_from_ini_file "cleo\Backfire.ini" section "Config" key "SoundID"
    then 7@ = 1131
    end
else 
    7@ = -1
    audiostream.Loop(4@,false)  
    audiostream.volume(4@) = 1.0
end
if 0AF0: 17@ = not get_int_from_ini_file "cleo\Backfire.ini" section "Config" key "byTuningModTurbo"
then 
else 17@ = true
end

if 17@ == true
then gosub @StoreHandlingBlocks
end


while true
    wait 0
    Actor.Driving($player_actor)
    jf continue
    0@ = actor.CurrentCar($player_actor)
    0A97: 31@ = car 0@ struct
    0A8E: 30@ = 31@ + 0x594 //mSubClass
    0A8D: 30@ = read_memory 30@ size 4 vp 0
    if or
    30@ == 0 //VEHICLE_AUTOMOBILE  
    30@ == 9 //VEHICLE_BIKE
    then                         
        0441: 1@ = car 0@ model
        09E1: get_car_model 1@ price_to 29@
        if 001D:   29@ > 6@
        then
            :InitALS
            0A8E: 29@ = 31@ + 0x284 //SomethingChangingWithGearChanging...  
            0A8E: 28@ = 31@ + 0x966 //AccPedal                              
            0A8E: 27@ = 31@ + 0x280 //RPM                                   
            0A8E: 30@ = 31@ + 0x37C //bNitroActivated                       
            0A8E: 8@ = 31@ + 0x428 //Flags
              
            
            0AB1: call_scm_func @GetVehicleDummyPosOffset 2 VehicleID 1@ DummyID 0x6 ReturnTo 11@ 12@ 13@
                                                   
            0A8E: 21@ = 31@ + 0x384 //pHandling  
            0A8D: 21@ = read_memory 21@ size 4 vp 0  
            21@ += 0xCC //ModelFlags    
            0A8D: 21@ = read_memory 21@ size 4 vp 0 
            if 08B7:   test 21@ bit 13 //VEHICLE_HANDLING_MODEL_DOUBLE_EXHAUST
            then
                0087: 10@ = 11@
                10@ *= -1.0
            else 10@ = 0
            end
            
            while Actor.Driving($player_actor)
                wait 0
                if 056E:   car 0@ defined
                jf break   
                0A8D: 24@ = read_memory 30@ size 1 vp 0 // bNitroActivated 
                if 24@ == 0
                jf continue
                
                                                             
                0A8D: 26@ = read_memory 29@ size 1 vp 0 //SomethingChangingWithGearChanging...  
                
                0A8D: 22@ = read_memory 27@ size 2 vp 0 //RPM   
                      
                02E3: 24@ = car 0@ speed
                
                if and
                26@ == 0     //is back to gear
                22@ <> 65535 //not in last gear
                22@ > 100    //not starting to accelerate
                24@ > 5.0    //not stopped
                then
                    gosub @BackFire
                end        
                        
                0A8D: 25@ = read_memory 28@ size 1 vp 0 //AccPedal  
                                        
                0A8D: 24@ = read_memory 8@ size 1 vp 0 //flags
                if and
                08B7:   test 24@ bit 5
                25@ == 128 //full throttle
                then
                    gosub @BackFire_Multi
                end 
                
                if 23@ == false
                then  
                    if 25@ == 128
                    then
                        23@ = true
                    end
                else  
                    if 25@ < 100
                    then
                        gosub @BackFire_Multi
                        23@ = false  
                    end
                end
            end
        else 
            if 17@ == true
            then
                if 0AB1: call_scm_func @IsIndieHandling 3  VehHandle 0@  startBlock 2@  _endBlock 3@   pHandling_to 8@
                then
                    // Check turbo is installed
                    8@ += 0xE5 //NewInfosStart                                   
                    0A8D: 8@ = read_memory 8@ size 2 vp 0 
                    if or
                    08B7:   test 8@ bit 4 //turbo low 
                    08B7:   test 8@ bit 5 //turbo basic
                    08B7:   test 8@ bit 6 //turbo street
                    08B7:   test 8@ bit 7 //turbo pro
                    then goto @InitALS 
                    else gosub @WhileInCar
                    end
                else gosub @WhileInCar
                end  
            else gosub @WhileInCar
            end
        end 
    else gosub @WhileInCar
    end
    if 7@ < 0
    then audiostream.Release(4@)
    end
end



:WhileInCar
while Actor.Driving($player_actor)
    wait 0
end
return


:BackFire  
if 10@ <> 0 //double exhausts
then
    066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 11@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
    064F: remove_references_to_particle 5@ 
    
    066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 10@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
    064F: remove_references_to_particle 5@ 
    
    0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 12@ 13@
    gosub @PlaySound
else
    066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 11@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
    064F: remove_references_to_particle 5@ 
    0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 11@ 12@ 13@
    gosub @PlaySound
end
return
  
:BackFire_Multi
0209: 19@ = random_int_in_ranges 0 4

for 20@ = 0 to 19@ 
    0209: 18@ = random_int_in_ranges 20 300 
    wait 18@  
    056E:   car 0@ defined
    0AA1: return_if_false
                      
    if 10@ <> 0 //double exhausts
    then                    
        066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 11@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
        064F: remove_references_to_particle 5@ 
        
        066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 10@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
        064F: remove_references_to_particle 5@ 
        
        0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 12@ 13@
        gosub @PlaySound
    else
        066C: 5@ = attach_particle "GUNFLASH" to_car 0@ with_offset 11@ 12@ 13@ rotation 0.0 -25.0 0.0 type 1 
        064F: remove_references_to_particle 5@ 
        
        0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 11@ 12@ 13@
        gosub @PlaySound
    end
end
return


:PlaySound
if 7@ > -1
then 018C: play_sound 7@ at 14@ 15@ 16@
else 
    audiostream.SetPosition(4@,16@,14@,15@)
    audiostream.PerformAction(4@,PLAY)
end
return

:GetVehicleDummyPosOffset{VehicleID, DummyID}
0AA7: call_function 0x00403DA0{_getModelPtr} num_params 1 pop 1 iId 0@ pclInfo 0@
0@ += 0x5C  // vehstruct
0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0
1@ *= 0xC   // sizeof Rwv3d
005A: 0@ += 1@
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
0AB2: ret 3 1@ 2@ 3@



:Check_TurboIsInstalled{car - part id}
0A97: 28@ = car 0@ struct
28@ += 0x384 //pHandling
0A8D: 28@ = read_memory 28@ size 4 vp 0
28@ += 0xE5 //NewInfosStart                                   
0A8D: 10@ = read_memory 28@ size 2 vp 0 
if or
08B7:   test 10@ bit 4  
08B7:   test 10@ bit 5
08B7:   test 10@ bit 6
08B7:   test 10@ bit 7
then 0485:  return_true
else 059A:  return_false
end
0AB2: ret 0


const                           
    _pHandling            = 0x384
    _startOfHandlingBlock = 2@
    _endOfHandlingBlock   = 3@
end 

:IsIndieHandling{VehHandle, startBlock, endBlock, ret pHandling}
0A97: 10@ = car 0@ struct
10@ += _pHandling
0A8D: 10@ = read_memory 10@ size 4 vp 0

if and
002D:   10@ >= 1@
802D:   10@ <  2@
then 059A:  return_false
else 0485:  return_true
end
0AB2: ret 1 10@

:StoreHandlingBlocks
// Get start, end and size of handling block
0A8D: _startOfHandlingBlock = read_memory 0x5BFA96 size 4 vp true // Startblock
_startOfHandlingBlock += 0x14
0A8D: 11@ = read_memory _startOfHandlingBlock size 4 virtual_protect 0
if 11@ == 0xFFFFFFFF
then
    0085: 11@ = _startOfHandlingBlock
    11@ += 8
    0A8D: 12@ = read_memory 11@ size 4 virtual_protect 0 // Number of vehicles
    11@ += 16                    
    0A8D: 13@ = read_memory 11@ size 4 virtual_protect 0 // Offset to vehicle's handling
    11@ += 20     
    0A8D: 14@ = read_memory 11@ size 4 virtual_protect 0 // Block size
    
    006A: 12@ *= 14@   // Number * Size
    _startOfHandlingBlock -= 0x14       // Return to startBlock
    005A: _startOfHandlingBlock += 13@   // startBlock + Offset to vehicle's handling
    0A8E: _endOfHandlingBlock = _startOfHandlingBlock += 12@   // = end
else  
    if _startOfHandlingBlock == 0xC2B9DC
    then
        0A8D: _endOfHandlingBlock = read_memory 0x6F531E size 4 vp true  
        005A: _endOfHandlingBlock += _startOfHandlingBlock // End
    else
        32@ = 0
        while 32@ < 10000
            wait 0  
            0ACD: show_text_highpriority "~r~Error: Apparently you have some Limit Adjuster with an incompatible handling's patch." time 1000
        end
    end
end
return