{$CLEO .cs} const key_check = 13@ end 0000: 05E5: 0@ = game_version gosub @restore while true wait 0 gosub @key_check if and key_check == true 00E0: player $PLAYER_CHAR driving 80DE: not player $PLAYER_CHAR driving_vehicle_type #DODO then 05E0: 1@ = read_memory 0x006FADD0 size 4 virtual_protect 0 //current view if 1@ == 1.0 then gosub @toggle while 00E0: player $PLAYER_CHAR driving wait 0 gosub @rc_check if or 00E1: key_pressed 0 2 00E1: key_pressed 0 3 00E1: key_pressed 0 5 00E1: key_pressed 0 7 00E1: key_pressed 0 13 //00E1: key_pressed 0 17 then break end end gosub @restore { while true wait 0 if and 80E1: not key_pressed 0 5 80E1: not key_pressed 0 7 then 0373: set_camera_directly_behind_player break end end } end end if and 00DE: player $PLAYER_CHAR driving_vehicle_type #DODO 00E1: key_pressed 0 18 then gosub @toggle while 00E1: key_pressed 0 18 wait 0 if 80DE: not player $PLAYER_CHAR driving_vehicle_type #DODO then break end end gosub @restore end end :rc_check if 0@ == 0 then 5@ = 0x9412F4 else 5@ = 0x9414AC //(untested) end 05E0: 4@ = read_memory 5@ size 4 virtual_protect 0 if 4@ <> 0 then gosub @restore while 4@ <> 0 05E0: 4@ = read_memory 5@ size 4 virtual_protect 0 wait 0 end gosub @toggle end return :key_check if and 80E1: not key_pressed 0 2 80E1: not key_pressed 0 3 80E1: not key_pressed 0 5 80E1: not key_pressed 0 7 //80E1: not key_pressed 0 17 80E1: not key_pressed 0 13 then key_check = true else key_check = false end return :toggle if 0@ == 0 then 05DF: write_memory 0x004AD2D5 size 1 value 0x00 virtual_protect 1 //car twitching else 05DF: write_memory 0x004AD3C5 size 1 value 0x00 virtual_protect 1 //car twitching end 03C1: 6@ = player $player_char car_no_save 05E7: 7@ = car 6@ struct 7@ += 0x1F6 05E0: 8@ = read_memory 7@ size 1 virtual_protect 1 //car flag 0373: set_camera_directly_behind_player if 0@ == 0 then //toggle movement 05DF: write_memory 0x0046D4A6 size 1 value 0x74 virtual_protect 1 //0x75 //distances if or 8@ == 32 8@ == 40 then 05DF: write_memory 0x5F07EC size 4 value 1.5 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 6.0 virtual_protect 0 else 05DF: write_memory 0x5F07EC size 4 value 3.0 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 9.0 virtual_protect 0 end //patching lineOfsight 05DF: write_memory 0x00460565 size 1 value 0x00 virtual_protect 1 //Vehicle //patching camera motion 05DF: write_memory 0x004709D7 size 1 value 0x00 virtual_protect 1 05DF: write_memory 0x00470BE3 size 1 value 0x00 virtual_protect 1 //hiding crosshair 05DF: write_memory 0x50551F size 4 value 0x005EE7DC virtual_protect 1 else :toggle11 //toggle movement 05DF: write_memory 0x0046D486 size 1 value 0x74 virtual_protect 1 //0x75 //distances if or 8@ == 32 8@ == 40 then 05DF: write_memory 0x5F07EC size 4 value 1.5 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 6.0 virtual_protect 0 else 05DF: write_memory 0x5F07EC size 4 value 3.0 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 9.0 virtual_protect 0 end //patching lineOfsight 05DF: write_memory 0x00460565 size 1 value 0x00 virtual_protect 1 //Vehicle //patching camera motion 05DF: write_memory 0x004709B7 size 1 value 0x00 virtual_protect 1 05DF: write_memory 0x00470BC3 size 1 value 0x00 virtual_protect 1 //hiding crosshair 05DF: write_memory 0x5055FF size 4 value 0x005EE7DC virtual_protect 1 end return :restore if 0@ == 0 then 05DF: write_memory 0x004AD2D5 size 1 value 0x01 virtual_protect 1 //car twitching else 05DF: write_memory 0x004AD3C5 size 1 value 0x01 virtual_protect 1 //car twitching end if 0@ == 0 then //toggle movement *restore 05DF: write_memory 0x0046D4A6 size 1 value 0x75 virtual_protect 1 //0x75 //distances *restore 05DF: write_memory 0x5F07EC size 4 value 0.8 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 2.0 virtual_protect 0 //patching lineOfsight *restore 05DF: write_memory 0x00460565 size 1 value 0x01 virtual_protect 1 //Vehicle //patching camera motion *restore //05DF: write_memory 0x004709D7 size 1 value 0x01 virtual_protect 1 //05DF: write_memory 0x00470BE3 size 1 value 0x01 virtual_protect 1 //hiding crosshair *restore 05DF: write_memory 0x50551F size 4 value 0x006FAE98 virtual_protect 1 else :restore11 //toggle movement *restore 05DF: write_memory 0x0046D486 size 1 value 0x75 virtual_protect 1 //0x75 //distances *restore 05DF: write_memory 0x5F07EC size 4 value 0.8 virtual_protect 0 05DF: write_memory 0x5F07DC size 4 value 2.0 virtual_protect 0 //patching lineOfsight *restore 05DF: write_memory 0x00460565 size 1 value 0x01 virtual_protect 1 //Vehicle //patching camera motion *restore //05DF: write_memory 0x004709B7 size 1 value 0x01 virtual_protect 1 //05DF: write_memory 0x00470BC3 size 1 value 0x01 virtual_protect 1 //hiding crosshair *restore 05DF: write_memory 0x5055FF size 4 value 0x6FAE98 virtual_protect 1 end return {2@ = 13 //camera 2@ *= 2 2@ += 0x6F0360 05DF: write_memory 2@ size 2 value 128 virtual_protect 1 //keypress emulation }