Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,365 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Junior_Djjr

How to disable camera movement

Recommended Posts

Junior_Djjr

I want to disable only camera control in SA, nothing more, like simply disabling the mouse, but I also need to read the mouse movement...

 

The opcode 01B4: (SET_PLAYER_CONTROL) disables camera control, but also the player movement. This works with some flags, but are flags that disables the player control, or the player control and camera... I want to disable the camera control and keep the player movements (keep driving a car, don't stop walking etc).

 

I also tried to find something in 0x00526FC0 (CCam::Process) but no success. There's a lot there, but everything I tried just caused bugs.

 

It's in CLEO but may be any changes in memory, in the latter cases I also accept solution using ASI.

Share this post


Link to post
Share on other sites
DK22Pac

I think I used something like this in GTA V HUD when I needed to disable camera control for weapon menu.

But not sure.

If that's what you need I could try to check it.

 

The problem with solution in CLEO is that it may require direct changes to asm instructions or function replacement, and that's hard to solve with CLEO (unless you love to write bytecode in hex...end blocks).

Edited by DK22Pac

Share this post


Link to post
Share on other sites
Junior_Djjr

I think I used something like this in GTA V HUD when I needed to disable camera control for weapon menu.

But not sure.

If that's what you need I could try to check it.

 

The problem with solution in CLEO is that it may require direct changes to asm instructions or function replacement, and that's hard to solve with CLEO (unless you love to write bytecode in hex...end blocks).

Nice. My mod also have a .asi file, so I can implement it there.

Share this post


Link to post
Share on other sites
Junior_Djjr

Nothing?

 

It's amazing how simple things like "disable camera control" become headaches in this game :p

Share this post


Link to post
Share on other sites
Wesser
Posted (edited)

This code will come in handy as-is for cleo-phile scripters or suit low-level C programmers with little effort because of rewriting:

 

// Enable GTA:SA SRC mode{$CLEO}goto @script_starthex    FFend:_CCamera__m_bDisablePadControlhex    00end:_CCamera__m_bDisableMouseMovementhex    00end:_hook_50EEBC_CCam__Process_1rstPersonPedOnPChex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0            // 00000005 test    al, al    75 0A           // 00000007 jnz     L1    A1 2434B700     // 00000009 mov     eax, CPad::NewMouseControllerState.X    E9 00000000     // 0000000E jmp     CCam::Process_1rstPersonPedOnPC+351h                    // L1:    83C4 04         // 00000013 add     esp, 4    E9 00000000     // 00000016 jmp     CCam::Process_1rstPersonPedOnPC+38Chend:_hook_50FAAA_CCam__Process_FollowPedWithMousehex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0            // 00000005 test    al, al    75 0A           // 00000007 jnz     L1    A1 2434B700     // 00000009 mov     eax, CPad::NewMouseControllerState.X    E9 00000000     // 0000000E jmp     CCam::Process_FollowPedWithMouse+13Fh                    // L1:    83C4 04         // 00000013 add     esp, 4    E9 00000000     // 00000016 jmp     CCam::Process_FollowPedWithMouse+17Chend:_hook_510ABC_CCam__Process_M16_1stPersonhex    8A0D 00000000   // 00000000 mov     cl, CCamera::m_bDisableMouseMovement    84C0            // 00000006 test    cl, cl    75 0B           // 00000008 jnz     L1    8B0D 2434B700   // 0000000A mov     ecx, CPad::NewMouseControllerState.X    E9 00000000     // 00000010 jmp     CCam::Process_M16_1stPerson+502h                    // L1:    83C4 04         // 00000015 add     esp, 4    E9 00000000     // 00000018 jmp     CCam::Process_M16_1stPerson+53Dhend:_hook_511C6E_CCam__Process_Rockethex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0            // 00000005 test    al, al    75 0A           // 00000007 jnz     L1    A1 2434B700     // 00000009 mov     eax, CPad::NewMouseControllerState.X    E9 00000000     // 0000000E jmp     CCam::Process_Rocket+123h                    // L1:    83C4 04         // 00000013 add     esp, 4    E9 00000000     // 00000016 jmp     CCam::Process_Rocket+15Ehend:_hook_522225_CCam__Process_AimWeaponhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0            // 00000005 test    al, al    75 0B           // 00000007 jnz     L1    D905 2434B700   // 00000009 fld     CPad::NewMouseControllerState.X    E9 00000000     // 0000000F jmp     CCam::Process_AimWeapon+0D2Bh                    // L1:    83C4 04         // 00000014 add     esp, 4    E9 00000000     // 00000017 jmp     CCam::Process_AimWeapon+0DCFhend:_hook_523F55_CCam__Process_FollowPed_SAhex    A0 00000000         // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0                // 00000005 test    al, al    74 07               // 00000007 jz      L1    D9EE                // 00000009 fldz    E9 00000000         // 0000000B jmp     CCam::Process_FollowPed_SA+1235h                        // L1:    D905 2434B700       // 00000010 fld     CPad::NewMouseControllerState.X    E9 00000000         // 00000016 jmp     CCam::Process_FollowPed_SA+121Bhend/*:_hook_524040_CCam__Process_FollowPed_SAhex    8A0D 00000000       // 00000000 mov     cl, CCamera::m_bDisableMouseMovement    84C9                // 00000006 test    cl, cl    74 20               // 00000008 jz      L1    C74424 24 00000000  // 0000000A mov     dword ptr [esp+8Ch-68h], 0    8A15 ABEFC300       // 00000012 mov     dl, CDraw::FadeValue    A0 79F0B600         // 00000018 mov     al, TheCamera.m_bFading    84C0                // 0000001D test    al, al    0F84 00000000       // 0000001F jz      CCam::Process_FollowPed_SA+1347h    E9 00000000         // 00000025 jmp     CCam::Process_FollowPed_SA+1333h                        // L1:    D905 2834B700       // 0000002A fld     CPad::NewMouseControllerState.Y    E9 00000000         // 00000030 jmp     CCam::Process_FollowPed_SA+1306hend*/:_hook_524040_CCam__Process_FollowPed_SAhex    8A0D 00000000       // 00000000 mov     cl, CCamera::m_bDisableMouseMovement    84C9                // 00000006 test    cl, cl    74 1A               // 00000008 jz      L1    C74424 24 00000000  // 0000000A mov     dword ptr [esp+8Ch-68h], 0    8A15 ABEFC300       // 00000012 mov     dl, CDraw::FadeValue    A0 79F0B600         // 00000018 mov     al, TheCamera.m_bFading    84C0                // 0000001D test    al, al    E9 00000000         // 0000001F jmp     CCam::Process_FollowPed_SA+1331h                        // L1:    D905 2834B700       // 00000024 fld     CPad::NewMouseControllerState.Y    E9 00000000         // 0000002A jmp     CCam::Process_FollowPed_SA+1306hend:_hook_525633_CCam__Process_FollowCar_SAhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisableMouseMovement    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CCam::Process_FollowCar_SA+1199h    D905 2834B700   // 0000000D fld     CPad::NewMouseControllerState.Y    E9 00000000     // 00000013 jmp     CCam::Process_FollowCar_SA+1089hend:_hook_53FDDA_CPad__GetLookLefthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::GetLookLeft+29h    668B51 0A       // 0000000D mov     dx, [ecx+CPad.NewState.LeftShoulder2]    6685D2          // 00000011 test    dx, dx    0F84 00000000   // 00000014 jz      CPad::GetLookLeft+1Ah    E9 00000000     // 0000001A jmp     CPad::GetLookLeft+13hend:_hook_53FE1A_CPad__GetLookRighthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::GetLookRight+29h    668B51 0E       // 0000000D mov     dx, [ecx+CPad.NewState.RightShoulder2]    6685D2          // 00000011 test    dx, dx    0F84 00000000   // 00000014 jz      CPad::GetLookRight+1Ah    E9 00000000     // 0000001A jmp     CPad::GetLookRight+13hend:_hook_53FE7D_CPad__GetLookBehindForCarhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::GetLookBehindForCar+0Ah    668379 0A 00    // 0000000D cmp     [ecx+CPad.NewState.LeftShoulder2], 0    0F85 00000000   // 00000012 jnz     CPad::GetLookBehindForCar+1Fh    E9 00000000     // 00000018 jmp     CPad::GetLookBehindForCar+14hend:_hook_53FECD_CPad__GetLookBehindForPedhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::GetLookBehindForPed+0Ah    668379 26 00    // 0000000D cmp     [ecx+CPad.NewState.ShockButtonR], 0    E9 00000000     // 00000012 jmp     CPad::GetLookBehindForPed+12hend:_hook_540AEA_CPad__GetForceCameraBehindPlayerhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::GetForceCameraBehindPlayer+38h    0FB781 0A010000 // 0000000D movzx   eax, [ecx+CPad.Mode]    E9 00000000     // 00000014 jmp     CPad::GetForceCameraBehindPlayer+11hend:_hook_540B3A_CPad__SniperZoomInhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::SniperZoomIn+3Dh    0FB781 0A010000 // 0000000D movzx   eax, [ecx+CPad.Mode]    E9 00000000     // 00000014 jmp     CPad::SniperZoomIn+11hend:_hook_540B8A_CPad__SniperZoomOuthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::SniperZoomOut+3Dh    0FB781 0A010000 // 0000000D movzx   eax, [ecx+CPad.Mode]    E9 00000000     // 00000014 jmp     CPad::SniperZoomOut+11hend:_hook_540BE0_CPad__SniperModeLookLeftRighthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::SniperModeLookLeftRight+0Ah    A0 82D78C00     // 0000000D mov     al, CPad::bSniperAimWithRightStick    E9 00000000     // 00000012 jmp     CPad::SniperModeLookLeftRight+15hend:_hook_540CD0_CPad__SniperModeLookUpDownhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::SniperModeLookUpDown+0Ah    A0 82D78C00     // 0000000D mov     al, CPad::bSniperAimWithRightStick    E9 00000000     // 00000012 jmp     CPad::SniperModeLookUpDown+15hend:_hook_540E81_CPad__LookAroundLeftRighthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::LookAroundLeftRight+0F6h    0FBF05 5C34B700 // 0000000D movsx   eax, Pads.NewState.RightStickX    E9 00000000     // 00000014 jmp     CPad::LookAroundLeftRight+8end:_hook_540F81_CPad__LookAroundUpDownhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::LookAroundUpDown+0B7h    A0 0234B700     // 0000000D mov     al, CPad::bInvertLook4Pad    E9 00000000     // 00000012 jmp     CPad::LookAroundUpDown+6end:_hook_541050_CPad__AimWeaponLeftRighthex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::AimWeaponLeftRight+0Ah    A0 2EECB600     // 0000000D mov     al, CCamera::m_bUseMouse3rdPerson    E9 00000000     // 00000012 jmp     CPad::AimWeaponLeftRight+15hend:_hook_5410D0_CPad__AimWeaponUpDownhex    A0 00000000     // 00000000 mov     al, CCamera::m_bDisablePadControl    84C0            // 00000005 test    al, al    0F85 00000000   // 00000007 jnz     CPad::AimWeaponUpDown+0Ah    A0 2EECB600     // 0000000D mov     al, CCamera::m_bUseMouse3rdPerson    E9 00000000     // 00000012 jmp     CPad::AimWeaponUpDown+15hend:script_startconst    _CCamera__m_bDisablePadControl    = [email protected] // static bool CCamera::m_bDisablePadControl    _CCamera__m_bDisableMouseMovement = [email protected] // static bool CCamera::m_bDisableMouseMovementendconst    _hook_50EEBC_CCam__Process_1rstPersonPedOnPC  = [email protected]    _hook_50FAAA_CCam__Process_FollowPedWithMouse = [email protected]    _hook_510ABC_CCam__Process_M16_1stPerson      = [email protected]    _hook_511C6E_CCam__Process_Rocket             = [email protected]    _hook_522225_CCam__Process_AimWeapon          = [email protected]    _hook_523F55_CCam__Process_FollowPed_SA       = [email protected]    _hook_524040_CCam__Process_FollowPed_SA       = [email protected]    _hook_525633_CCam__Process_FollowCar_SA       = [email protected]    _hook_53FDDA_CPad__GetLookLeft                = [email protected]    _hook_53FE1A_CPad__GetLookRight               = [email protected]    _hook_53FE7D_CPad__GetLookBehindForCar        = [email protected]    _hook_53FECD_CPad__GetLookBehindForPed        = [email protected]    _hook_540AEA_CPad__GetForceCameraBehindPlayer = [email protected]    _hook_540B3A_CPad__SniperZoomIn               = [email protected]    _hook_540B8A_CPad__SniperZoomOut              = [email protected]    _hook_540BE0_CPad__SniperModeLookLeftRight    = [email protected]    _hook_540CD0_CPad__SniperModeLookUpDown       = [email protected]    _hook_540E81_CPad__LookAroundLeftRight        = [email protected]    _hook_540F81_CPad__LookAroundUpDown           = [email protected]    _hook_541050_CPad__AimWeaponLeftRight         = [email protected]    _hook_5410D0_CPad__AimWeaponUpDown            = [email protected]: get_this_script_struct [email protected]@ += 0x10 // offsetof(CRunningScript, m_pStartAddress)0A8D: read_process_memory [email protected] size 4 vp FALSE store_to [email protected]: _CCamera__m_bDisablePadControl = [email protected] - @_CCamera__m_bDisablePadControl0A8F: _CCamera__m_bDisableMouseMovement = [email protected] - @_CCamera__m_bDisableMouseMovement0A8F: _hook_50EEBC_CCam__Process_1rstPersonPedOnPC = [email protected] - @_hook_50EEBC_CCam__Process_1rstPersonPedOnPC0A8F: _hook_50FAAA_CCam__Process_FollowPedWithMouse = [email protected] - @_hook_50FAAA_CCam__Process_FollowPedWithMouse0A8F: _hook_510ABC_CCam__Process_M16_1stPerson = [email protected] - @_hook_510ABC_CCam__Process_M16_1stPerson0A8F: _hook_511C6E_CCam__Process_Rocket = [email protected] - @_hook_511C6E_CCam__Process_Rocket0A8F: _hook_522225_CCam__Process_AimWeapon = [email protected] - @_hook_522225_CCam__Process_AimWeapon0A8F: _hook_523F55_CCam__Process_FollowPed_SA = [email protected] - @_hook_523F55_CCam__Process_FollowPed_SA0A8F: _hook_524040_CCam__Process_FollowPed_SA = [email protected] - @_hook_524040_CCam__Process_FollowPed_SA0A8F: _hook_525633_CCam__Process_FollowCar_SA = [email protected] - @_hook_525633_CCam__Process_FollowCar_SA0A8F: _hook_53FDDA_CPad__GetLookLeft = [email protected] - @_hook_53FDDA_CPad__GetLookLeft0A8F: _hook_53FE1A_CPad__GetLookRight = [email protected] - @_hook_53FE1A_CPad__GetLookRight0A8F: _hook_53FE7D_CPad__GetLookBehindForCar = [email protected] - @_hook_53FE7D_CPad__GetLookBehindForCar0A8F: _hook_53FECD_CPad__GetLookBehindForPed = [email protected] - @_hook_53FECD_CPad__GetLookBehindForPed0A8F: _hook_540AEA_CPad__GetForceCameraBehindPlayer = [email protected] - @_hook_540AEA_CPad__GetForceCameraBehindPlayer0A8F: _hook_540B3A_CPad__SniperZoomIn = [email protected] - @_hook_540B3A_CPad__SniperZoomIn0A8F: _hook_540B8A_CPad__SniperZoomOut = [email protected] - @_hook_540B8A_CPad__SniperZoomOut0A8F: _hook_540BE0_CPad__SniperModeLookLeftRight = [email protected] - @_hook_540BE0_CPad__SniperModeLookLeftRight0A8F: _hook_540CD0_CPad__SniperModeLookUpDown = [email protected] - @_hook_540CD0_CPad__SniperModeLookUpDown0A8F: _hook_540E81_CPad__LookAroundLeftRight = [email protected] - @_hook_540E81_CPad__LookAroundLeftRight0A8F: _hook_540F81_CPad__LookAroundUpDown = [email protected] - @_hook_540F81_CPad__LookAroundUpDown0A8F: _hook_541050_CPad__AimWeaponLeftRight = [email protected] - @_hook_541050_CPad__AimWeaponLeftRight0A8F: _hook_5410D0_CPad__AimWeaponUpDown = [email protected] - @_hook_5410D0_CPad__AimWeaponUpDown0A8F: [email protected] = _hook_50EEBC_CCam__Process_1rstPersonPedOnPC - 0x0050EEC10A8C: write_process_memory 0x0050EEBC size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0050EEBD size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_50EEBC_CCam__Process_1rstPersonPedOnPC + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_50EEBC_CCam__Process_1rstPersonPedOnPC + 0x0F0A8F: [email protected] = 0x0050EEBD - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_50EEBC_CCam__Process_1rstPersonPedOnPC + 0x170A8F: [email protected] = 0x0050EEF8 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_50FAAA_CCam__Process_FollowPedWithMouse - 0x0050FAAF0A8C: write_process_memory 0x0050FAAA size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0050FAAB size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_50FAAA_CCam__Process_FollowPedWithMouse + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_50FAAA_CCam__Process_FollowPedWithMouse + 0x0F0A8F: [email protected] = 0x0050FAAB - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_50FAAA_CCam__Process_FollowPedWithMouse + 0x170A8F: [email protected] = 0x0050FAE8 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_510ABC_CCam__Process_M16_1stPerson - 0x00510AC10A8C: write_process_memory 0x00510ABC size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00510ABD size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00510AC1 size 1 value 0x90 vp TRUE0A8E: [email protected] = _hook_510ABC_CCam__Process_M16_1stPerson + 20A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_510ABC_CCam__Process_M16_1stPerson + 0x110A8F: [email protected] = 0x00510ABE - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_510ABC_CCam__Process_M16_1stPerson + 0x190A8F: [email protected] = 0x00510AF9 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_511C6E_CCam__Process_Rocket - 0x00511C730A8C: write_process_memory 0x00511C6E size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00511C6F size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_511C6E_CCam__Process_Rocket + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_511C6E_CCam__Process_Rocket + 0x0F0A8F: [email protected] = 0x00511C6F - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_511C6E_CCam__Process_Rocket + 0x170A8F: [email protected] = 0x00511CAA - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_522225_CCam__Process_AimWeapon - 0x0052222A0A8C: write_process_memory 0x00522225 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00522226 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x0052222A size 1 value 0x90 vp TRUE0A8E: [email protected] = _hook_522225_CCam__Process_AimWeapon + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_522225_CCam__Process_AimWeapon + 0x100A8F: [email protected] = 0x00522227 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_522225_CCam__Process_AimWeapon + 0x180A8F: [email protected] = 0x005222CB - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_523F55_CCam__Process_FollowPed_SA - 0x00523F5A0A8C: write_process_memory 0x00523F55 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00523F56 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00523F5A size 1 value 0x90 vp TRUE0A8E: [email protected] = _hook_523F55_CCam__Process_FollowPed_SA + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_523F55_CCam__Process_FollowPed_SA + 0x0C0A8F: [email protected] = 0x00523F71 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_523F55_CCam__Process_FollowPed_SA + 0x170A8F: [email protected] = 0x00523F57 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_524040_CCam__Process_FollowPed_SA - 0x005240450A8C: write_process_memory 0x00524040 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00524041 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00524045 size 1 value 0x90 vp TRUE0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 20A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE/*0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 0x210A8F: [email protected] = 0x00524083 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 0x260A8F: [email protected] = 0x0052406F - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 0x310A8F: [email protected] = 0x00524042 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE*/0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 0x200A8F: [email protected] = 0x0052406D - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_524040_CCam__Process_FollowPed_SA + 0x2B0A8F: [email protected] = 0x00524042 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_525633_CCam__Process_FollowCar_SA - 0x005256380A8C: write_process_memory 0x00525633 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00525634 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00525638 size 1 value 0x90 vp TRUE0A8E: [email protected] = _hook_525633_CCam__Process_FollowCar_SA + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisableMouseMovement vp FALSE0A8E: [email protected] = _hook_525633_CCam__Process_FollowCar_SA + 90A8F: [email protected] = 0x00525745 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_525633_CCam__Process_FollowCar_SA + 0x140A8F: [email protected] = 0x00525635 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_53FDDA_CPad__GetLookLeft - 0x0053FDDF0A8C: write_process_memory 0x0053FDDA size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0053FDDB size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x0053FDDF size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_53FDDA_CPad__GetLookLeft + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_53FDDA_CPad__GetLookLeft + 90A8F: [email protected] = 0x0053FDF5 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FDDA_CPad__GetLookLeft + 0x160A8F: [email protected] = 0x0053FDE6 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FDDA_CPad__GetLookLeft + 0x1B0A8F: [email protected] = 0x0053FDDF - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_53FE1A_CPad__GetLookRight - 0x0053FE1F0A8C: write_process_memory 0x0053FE1A size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0053FE1B size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x0053FE1F size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_53FE1A_CPad__GetLookRight + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_53FE1A_CPad__GetLookRight + 90A8F: [email protected] = 0x0053FE35 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FE1A_CPad__GetLookRight + 0x160A8F: [email protected] = 0x0053FE26 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FE1A_CPad__GetLookRight + 0x1B0A8F: [email protected] = 0x0053FE1F - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_53FE7D_CPad__GetLookBehindForCar - 0x0053FE820A8C: write_process_memory 0x0053FE7D size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0053FE7E size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_53FE7D_CPad__GetLookBehindForCar + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_53FE7D_CPad__GetLookBehindForCar + 90A8F: [email protected] = 0x0053FE76 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FE7D_CPad__GetLookBehindForCar + 0x140A8F: [email protected] = 0x0053FE8B - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FE7D_CPad__GetLookBehindForCar + 0x190A8F: [email protected] = 0x0053FE80 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_53FECD_CPad__GetLookBehindForPed - 0x0053FED20A8C: write_process_memory 0x0053FECD size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x0053FECE size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_53FECD_CPad__GetLookBehindForPed + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_53FECD_CPad__GetLookBehindForPed + 90A8F: [email protected] = 0x0053FEC6 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_53FECD_CPad__GetLookBehindForPed + 0x130A8F: [email protected] = 0x0053FECE - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540AEA_CPad__GetForceCameraBehindPlayer - 0x00540AEF0A8C: write_process_memory 0x00540AEA size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540AEB size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00540AEF size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_540AEA_CPad__GetForceCameraBehindPlayer + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540AEA_CPad__GetForceCameraBehindPlayer + 90A8F: [email protected] = 0x00540B14 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540AEA_CPad__GetForceCameraBehindPlayer + 0x150A8F: [email protected] = 0x00540AED - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540B3A_CPad__SniperZoomIn - 0x00540B3F0A8C: write_process_memory 0x00540B3A size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540B3B size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00540B3F size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_540B3A_CPad__SniperZoomIn + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540B3A_CPad__SniperZoomIn + 90A8F: [email protected] = 0x00540B69 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540B3A_CPad__SniperZoomIn + 0x150A8F: [email protected] = 0x00540B3D - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540B8A_CPad__SniperZoomOut - 0x00540B8F0A8C: write_process_memory 0x00540B8A size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540B8B size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00540B8F size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_540B8A_CPad__SniperZoomOut + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540B8A_CPad__SniperZoomOut + 90A8F: [email protected] = 0x00540BB9 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540B8A_CPad__SniperZoomOut + 0x150A8F: [email protected] = 0x00540B8D - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540BE0_CPad__SniperModeLookLeftRight - 0x00540BE50A8C: write_process_memory 0x00540BE0 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540BE1 size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_540BE0_CPad__SniperModeLookLeftRight + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540BE0_CPad__SniperModeLookLeftRight + 90A8F: [email protected] = 0x00540BD6 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540BE0_CPad__SniperModeLookLeftRight + 0x130A8F: [email protected] = 0x00540BE1 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540CD0_CPad__SniperModeLookUpDown - 0x00540CD50A8C: write_process_memory 0x00540CD0 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540CD1 size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_540CD0_CPad__SniperModeLookUpDown + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540CD0_CPad__SniperModeLookUpDown + 90A8F: [email protected] = 0x00540CC6 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540CD0_CPad__SniperModeLookUpDown + 0x130A8F: [email protected] = 0x00540CD1 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540E81_CPad__LookAroundLeftRight - 0x00540E860A8C: write_process_memory 0x00540E81 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540E82 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00540E86 size 2 value 0x9066 vp TRUE0A8E: [email protected] = _hook_540E81_CPad__LookAroundLeftRight + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540E81_CPad__LookAroundLeftRight + 90A8F: [email protected] = 0x00540F72 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540E81_CPad__LookAroundLeftRight + 0x150A8F: [email protected] = 0x00540E84 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_540F81_CPad__LookAroundUpDown - 0x00540F860A8C: write_process_memory 0x00540F81 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00540F82 size 4 value [email protected] vp TRUE0A8C: write_process_memory 0x00541036 size 4 value 0xC033665E vp TRUE0A8E: [email protected] = _hook_540F81_CPad__LookAroundUpDown + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_540F81_CPad__LookAroundUpDown + 90A8F: [email protected] = 0x00541033 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_540F81_CPad__LookAroundUpDown + 0x130A8F: [email protected] = 0x00540F82 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_541050_CPad__AimWeaponLeftRight - 0x005410550A8C: write_process_memory 0x00541050 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x00541051 size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_541050_CPad__AimWeaponLeftRight + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_541050_CPad__AimWeaponLeftRight + 90A8F: [email protected] = 0x00541046 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_541050_CPad__AimWeaponLeftRight + 0x130A8F: [email protected] = 0x00541051 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8F: [email protected] = _hook_5410D0_CPad__AimWeaponUpDown - 0x005410D50A8C: write_process_memory 0x005410D0 size 1 value 0xE9 vp TRUE0A8C: write_process_memory 0x005410D1 size 4 value [email protected] vp TRUE0A8E: [email protected] = _hook_5410D0_CPad__AimWeaponUpDown + 10A8C: write_process_memory [email protected] size 4 value _CCamera__m_bDisablePadControl vp FALSE0A8E: [email protected] = _hook_5410D0_CPad__AimWeaponUpDown + 90A8F: [email protected] = 0x005410C6 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSE0A8E: [email protected] = _hook_5410D0_CPad__AimWeaponUpDown + 0x130A8F: [email protected] = 0x005410D1 - [email protected]: write_process_memory [email protected] size 4 value [email protected] vp FALSEwhile true    0001: wait 0    // Here you can write a 1-byte boolean value to CCamera::m_bDisablePadControl and CCamera::m_bDisableMouseMovement virtual addresses.end//0A93: terminate_this_custom_script
Make your own choice.

 

EDIT: Some pertinent discoveries:

 

 

 

// CPad+0x010Eunion {    struct {        unsigned short : 1; // eCamMode::MODE_1STPERSON leftover?        unsigned short : 1; // unused        unsigned short bPlayerAwaitsInGarage : 1;        unsigned short bPlayerOnInteriorTransition : 1;        unsigned short : 1; // unused        unsigned short bPlayerSafe : 1;        unsigned short bPlayerTalksOnPhone : 1; // bPlayerSafeForPhoneCall?        unsigned short bPlayerSafeForCutscene : 1;        unsigned short bPlayerSkipsToDestination : 1; // bPlayerSafeForDestination?        unsigned short : 0; // unused    };    unsigned short DisablePlayerControls; // Set to true while menu is switched on (preserving flags) and reset upon resurrection.};

 

Edited by Wesser

Share this post


Link to post
Share on other sites
Junior_Djjr

Two words: Holy sh*t.

Share this post


Link to post
Share on other sites
Junior_Djjr
Posted (edited)

There's something wrong with ForceCameraBehindPlayer

 

Game version: GTA SA 1.0 US

Unhandled exception at 0x1B297E06 in gta_sa.exe: 0xC0000005: Access violation reading location 0x00000000.
Register dump:
EAX: 0x00B73458 EBX: 0x00000000 ECX: 0x00B73458 EDX: 0x00000000
EDI: 0x00000000 ESI: 0x10B300E8 EBP: 0x00000000 EIP: 0x1B297E06
ESP: 0x0177F1B8 EFL: 0x00210246 CS: 0x00000023 SS: 0x0000002B
GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B
Stack dump:
0x0177F1B8: 0060ABBD FFFFFFFF 10B300E8 00000005 00000000 00000000
0x0177F1D0: 00000000 00000000 00000000 00000000 00000000 00000000
0x0177F1E8: 00000004 0060CE40 00000000 10B300E8 0E0A6558 00B478FC
0x0177F200: 10C20C48 00000005 00000002 00734A5D 10C20C48 00734A20
0x0177F218: 0177F21C 00532B60 10C22A5C 10C20C48 10B300E8 0177F250
0x0177F230: 0083ED41 FFFFFFFF 0060D614 00000000 00000000 00000000
0x0177F248: 00000002 10B300E8 0177F284 0083ED58 00000000 005D2E0C
0x0177F260: 00000000 00000000 0177F2AD 1F490E79 00000001 00000000
0x0177F278: 00000001 00000000 10B300E8 0177F574 0083D6C1 00000000
0x0177F290: 005D0895 005D18FF 0177F588 0177F58C 0177F52C 0177F6B4
base: 0x01580000 top: 0x0177F1B8 bottom: 0x01780000
Backtrace (may be wrong):
=>0x1B297E06 in unknown (+0x1b297e06) (0x0177F1B4)

0x0060ABBD in gta_sa.exe (+0x20abbd)

 

Removing it works well but when enabled it (bDisableMouseMovement), crashes.

 

Game version: GTA SA 1.0 US

Unhandled exception at 0x00524073 in gta_sa.exe (+0x124073): 0xC0000005: Access violation writing location 0x00000101.
Register dump:
EAX: 0x00000101 EBX: 0x00B6F258 ECX: 0x00B73401 EDX: 0x00B734FF
EDI: 0x00B6F19C ESI: 0x00B6F248 EBP: 0x10B300E8 EIP: 0x00524073
ESP: 0x0177F480 EFL: 0x00210202 CS: 0x00000023 SS: 0x0000002B
GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B
Stack dump:
0x0177F480: 00B6F19C 10BF5B01 10BF5B2C 00B6F3B8 3DCCCCCD 3F7F42EF
0x0177F498: BCF59640 40001893 BFC90FDB 00000000 3D4CCCCE 00B73458
0x0177F4B0: 00000000 BFC90FDB BDCCCCCD 38724299 40800000 00000000
0x0177F4C8: 3B3D1100 3F490FDB 3FBDE44F 00000000 00000000 43A2E567
0x0177F4E0: C4E085A0 40AB09BF 00000000 407FF200 3DA40000 00000000
0x0177F4F8: 00000000 3D24209E 41B00000 43420000 43420000 00527A0E
0x0177F510: 0177F544 3FC90FDB 00000000 00000000 00000000 00000000
0x0177F528: 00000000 00B6F980 00B6F028 00000000 3FC90FDB 40000000
0x0177F540: 00640096 43A2E567 C4E085A0 4097D68C 43A2E567 C4E085A0
0x0177F558: 4097D68C 00000000 00000000 00000000 42D00000 43700000
base: 0x01580000 top: 0x0177F480 bottom: 0x01780000
Backtrace (may be wrong):
=>0x00524073 in gta_sa.exe (+0x124073) (0x0177F508)
0x00527A0E in gta_sa.exe (+0x127a0e) (0x0177F598)
0x007EE1F5 in gta_sa.exe (+0x3ee1f5) (0x0177F5A4)
0x0052B89E in gta_sa.exe (+0x12b89e) (0x0177F5AC)
0x0052B90F in gta_sa.exe (+0x12b90f) (0x0177F60C)
0x00441C1F in gta_sa.exe (+0x41c1f)

In this case, removing hook_524040 works, but only horizontally.

(I can't test bDisablePadControl)
Edited by Junior_Djjr

Share this post


Link to post
Share on other sites
Wesser

I'm unable to reproduce the crashes you are experiencing. Could you tell me under what circumstances your game hangs out?

Share this post


Link to post
Share on other sites
Junior_Djjr

I'm unable to reproduce the crashes you are experiencing. Could you tell me under what circumstances your game hangs out?

It's a SilentPatch incompatibility. Tested on clean game.

Share this post


Link to post
Share on other sites
Wesser

Uhm, the script still works flawlessly even with SilentPatch installed. :p

Share this post


Link to post
Share on other sites
Junior_Djjr

Do you tested enabling _CCamera__m_bDisableMouseMovement?

Testing again, the problem only appeared when enabled.

Share this post


Link to post
Share on other sites
Wesser

Indeed, I got a crash on fading due to a conflicting SilentPatch hack. Try again with the updated script.

Share this post


Link to post
Share on other sites
Junior_Djjr

Seems to work now. :)

 

But I noticed that the old crash happens randomly.

 

Game version: GTA SA 1.0 US

Unhandled exception at 0x17A73223 in gta_sa.exe: 0xC0000005: Access violation reading location 0x00000000.

Register dump:

EAX: 0x00B73458 EBX: 0x00000000 ECX: 0x00B73458 EDX: 0x00000000

EDI: 0x00000000 ESI: 0x10B300E8 EBP: 0x00000000 EIP: 0x17A73223

ESP: 0x0177F1B8 EFL: 0x00210246 CS: 0x00000023 SS: 0x0000002B

GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B

 

Stack dump:

0x0177F1B8: 0060ABBD FFFFFFFF 10B300E8 00000005 00000000 00000000

0x0177F1D0: 00000000 00000000 00000000 00000000 00000000 00000000

0x0177F1E8: 00000004 0060CE40 00000000 10B300E8 0DC1CC28 00B478FC

0x0177F200: 10C1BF70 00000005 00000002 00734A5D 10C1BF70 00734A20

0x0177F218: 0177F21C 00532B60 10C1DD84 10C1BF70 10B300E8 0177F250

0x0177F230: 0083ED41 FFFFFFFF 0060D614 00000000 00000000 00000000

0x0177F248: 00000002 10B300E8 0177F284 0083ED58 00000000 005D2E0C

0x0177F260: 00000000 00000000 0177F2AD 1E822859 00000001 00000000

0x0177F278: 00000001 00000000 10B300E8 0177F574 0083D6C1 00000000

0x0177F290: 005D0895 005D18FF 0177F588 0177F58C 0177F52C 0177F6B4

base: 0x01580000 top: 0x0177F1B8 bottom: 0x01780000

 

Backtrace (may be wrong):

=>0x17A73223 in unknown (+0x17a73223) (0x0177F1B4)

0x0060ABBD in gta_sa.exe (+0x20abbd)

 

Just open the game without activating, often cause this crash when you start. It must be another incompatibility with other mod.

 

Was fixed by putting wait 2000 at script start (tested 20 times).

Share this post


Link to post
Share on other sites
DK22Pac
Posted (edited)

Nothing?

Here's how it works in V HUD (it only disables camera movement with mouse (but that's exactly what we needed there)):

 

#include "plugin.h"#include "extensions\KeyCheck.h"using namespace plugin;class DisableCamMovement {public:    DisableCamMovement() {        if (GetGameVersion() == GAME_10US) {            static int addresses[14] = { 0x510C28, 0x50FB28, 0x50F048, 0x511E0A, 0x52228E, 0x510C1C,                0x50F03C, 0x50FB18, 0x511DFE, 0x5222A0, 0x523F71, 0x524069, 0x525705, 0x525715 };            static bool bDisabled = false;            static float fZero = 0.0f;            Events::gameProcessEvent += [] {                KeyCheck::Update();                if (KeyCheck::CheckJustUp('M')) { // press 'M' for switch                    bDisabled = !bDisabled;                    for (int i = 0; i < 14; i++) {                        if (bDisabled)                            patch::SetPointer(addresses[i], &fZero);                        else                            patch::SetInt(addresses[i], (i > 4) ? 0xB6EC1C : 0xB6EC18);                    }                }            };        }        else            Error("This plugin works only with 1.0 US exe");    }} disableCamMovement;

This code will come in handy as-is for cleo-phile scripters or suit low-level C programmers with little effort because of rewriting

 

RfzSIjq.png

 

 

 

No offense, Wesser, but why do you always try to complicate simple things?

Edited by DK22Pac

Share this post


Link to post
Share on other sites
Junior_Djjr

I think the Wesser scripts very interesting because it's some low-level art... but without doubt when putting into practice I prefer effective scripts like this one ↑ :p

 

Much thanks, I'll check it soon.

Share this post


Link to post
Share on other sites
Wesser

Examining the conceptual similarities, solutions are nowhere near as comparable:

 

CCam::Process_Rocket (00511C6E)

 

if(!CCamera::m_bDisableMouseMovement&& (CPad::NewMouseControllerState.X != 0 || CPad::NewMouseControllerState.Y != 0)){    v1 = m_fFOV / 80.0f;    v2 = CPad::NewMouseControllerState.X * -3.0f * v1 * CCamera::m_fMouseAccelHorzntl;    v3 = CPad::NewMouseControllerState.Y *  4.0f * v1 * CCamera::m_fMouseAccelVertical;}else    // Pad/Keyboard inputs.
if(CPad::NewMouseControllerState.X != 0 || CPad::NewMouseControllerState.Y != 0){    v1 = m_fFOV / 80.0f;    v2 = CPad::NewMouseControllerState.X * -3.0f * v1 * 0;    v3 = CPad::NewMouseControllerState.Y *  4.0f * v1 * 0;}else    // Pad/Keyboard inputs.
See the difference? The last code discards any other devices input if a mouse movement is detected even if disabled!

Share this post


Link to post
Share on other sites
DK22Pac
Posted (edited)

I didn't compare your code with 'mine', I left it here just to show Junior how it works in V HUD.

 

it's some low-level art...

No, no and no. As long as you think so, people like Wesser will continue complicating simple things.

 

I think the most elegant way to completely disable camera for now is this one:

 

#include "plugin.h"#include "extensions\KeyCheck.h"using namespace plugin;class DisableCamMovement {public:    DisableCamMovement() {        static bool bDisabled = false;        using mycb_t = bool(*)();        static mycb_t Default = patch::TranslateCallOffset<mycb_t>(0x53C0F6);        Events::gameProcessEvent += [] {            KeyCheck::Update();            if (KeyCheck::CheckJustUp('M')) // press 'M' for switch                bDisabled = !bDisabled;        };        patch::ReplaceFunctionCall(0x53C0F6, (mycb_t)[] {            return !bDisabled && Default();        });    }} disableCamMovement;
Edited by DK22Pac

Share this post


Link to post
Share on other sites
Junior_Djjr

Changed the Solved post.

Share this post


Link to post
Share on other sites
Wesser
Posted (edited)

I think the most elegant way to completely disable camera for now is this one [...]

Then camera won't react to entities passing by its position nor follow the player and other stuff, what @Junior_Djjr wish not to. Struggling to oversimplify things without realizing to make them unrealiable is bad, but still, your codes are insteresting. You could at least not scorn me and my work gratuitously and act snooty (kind of "let him go"). You are taking this very personal and I don't know why.

 

I'm a bit disappointed in the best answer switch, but, fine... Who's content with the least is the richest of all.

Edited by Wesser

Share this post


Link to post
Share on other sites
Junior_Djjr

Then camera won't react to entities passing by its position nor follow the player and other stuff, what @Junior_Djjr wish not to.

To me, this looks like a bonus.

 

 

I'm a bit disappointed in the best answer switch, but, fine... Who's content with the least is the richest of all.

The main reason was the use of asi. I think no one would like to use 600 lines of code to disable camera movement. :/

Share this post


Link to post
Share on other sites
Wesser
Posted (edited)

That ain't the point. You have to affect the game logic to make things right which you cannot achieve by a classy pointer exchange.

Edited by Wesser

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.