Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

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

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. 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. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
𝓦𝓸𝓵𝓯

Doherty Garage Camera Fix or Disable

Recommended Posts

𝓦𝓸𝓵𝓯

There is some code to disable camera inside the doherty garage from the scripts and can help me
how do i find this?

Edited by 𝓦𝓸𝓵𝓯
Thanks for helps.

Share this post


Link to post
Share on other sites
ZAZ

what exactly means doherty garage ?

Share this post


Link to post
Share on other sites
𝓦𝓸𝓵𝓯
14 hours ago, ZAZ said:

what exactly means doherty garage ?

this

latest?cb=20090510054958

 

camera gif here:

2da7543a2617ad57ad7af65b7a8c2a0a.gif

 

https://forum.sa-mp.com/showthread.php?t=580096

Share this post


Link to post
Share on other sites
ZAZ

I didn't found a way to terminate this cam but with script i can force the camera to do what i want

 

test the script below

First teleport into garage interior, then press backspace+Tab to run camera codes

press enter/exit to change back to default camera

{$CLEO .cs}
thread  'PLAYCAM' 

 

while true
wait 0 
    if 
        0256:   player $PLAYER_CHAR defined 
    then
        if and
            0AB0:   key_pressed 8//------------  	Backspace key
            0AB0:   key_pressed 9//------------  	TAB key
        then
            
            8@ = 3.0 
            16@ = 0.0
            0172: 4@ = actor $PLAYER_ACTOR Z_angle 

            while 0256:   player $PLAYER_CHAR defined
                wait 0
                04C4: create_coordinate 0@ 1@ 2@ from_actor $PLAYER_ACTOR offset 0.0 1.0  0.5
                //00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@ 
                0087: 9@ = 0@ // (float) 
                0087: 10@ = 1@ // (float) 
                0087: 11@ = 2@ // (float) 
                0A4A: store_joystick_X_offset_to 5@ Y_offset_to 15@ 
                005B: 4@ += 5@ // (float) 
                02F6: 6@ = sine 4@ // (float) 
                02F7: 7@ = cosine 4@ // (float) 
                006B: 6@ *= 8@ // (float) 
                006B: 7@ *= 8@ // (float) 
                005B: 0@ += 6@ // (float) 
                005B: 1@ += 7@ // (float) 
                0063: 9@ -= 6@ // (float) 
                0063: 10@ -= 7@ // (float) 
                005B: 12@ += 15@ // (float) 
                02F7: 13@ = cosine 12@ // (float) 
                006B: 13@ *= 8@ // (float) 
                005B: 2@ += 13@ // (float) 
                0063: 11@ -= 13@ // (float) 
                015F: set_camera_position 9@ 10@ 11@ rotation 0.0 0.0 0.0 
                0160: set_camera_point_at 0@ 1@ 2@ mode 2
                0087: 21@ = 9@ // copy cam x into a new var 
                0087: 22@ = 10@ // copy cam y into a new var 
                0063: 21@ -= 0@ // substract player_pos. x from cam x 
                0063: 22@ -= 1@ // substract player_pos. y from cam y 
                0013: 21@ *= -5.0 // multiplicate the result from above with a negativ value
                0013: 22@ *= -5.0 //  to enlarge the player_pos.-cam_pos.-line in direction of the cam target
                005B: 9@ += 21@ // add the x-result from above to the cam_pos. x 
                005B: 10@ += 22@ // add the y-result from above to the cam_pos. y
                0063: 9@ -= 0@ // substract player_pos. x from  x-result from above
                0063: 10@ -= 1@ // substract player_pos. y from  y-result from above 
                0604: get_Z_angle_for_point 9@ 10@ store_to 30@ 
                0173: set_actor $PLAYER_ACTOR Z_angle_to 30@                 
                
                if
                    00E1:   key_pressed  0  15
                then
                    break
                end
            
            end
            
            while 8256: not  player $PLAYER_CHAR defined
                wait 0            
            end
            
            0373: set_camera_directly_behind_player 
            02EB: restore_camera_with_jumpcut            
            
        end
    end
end

 

Edited by ZAZ
  • Like 1

Share this post


Link to post
Share on other sites
𝓦𝓸𝓵𝓯
8 hours ago, ZAZ said:

I didn't found a way to terminate this cam but with script i can force the camera to do what i want

 

test the script below

First teleport into garage interior, then press backspace+Tab to run camera codes

press enter/exit to change back to default camera

Great, this one was good, thank you so much for playing killing policemen and entering the garage with this camera already got better.

Share this post


Link to post
Share on other sites
OrionSR
{$CLEO .cs}
0001: wait 3000 ms
0A8D: [email protected] = read_memory 0x96D325 size 2 virtual_protect 0
08BA: set [email protected] bit 13
0A8C: write_memory 0x96D325 size 2 value [email protected] virtual_protect 0
09F1: play_audio_at_actor $PLAYER_ACTOR event 1133
0A93: end_custom_thread

This script should change the garage setting to enable Camera Follows Player. The setting should persist in the save so be sure to disable the script until it's needed again.

  • Like 2

Share this post


Link to post
Share on other sites
𝓦𝓸𝓵𝓯
15 hours ago, OrionSR said:

This script should change the garage setting to enable Camera Follows Player. The setting should persist in the save so be sure to disable the script until it's needed again.

it worked perfectly the way wanted.

tDne9Tl.jpg

 

15 hours ago, OrionSR said:

09F1: play_audio_at_actor $PLAYER_ACTOR event 1133

Probably repair sounds appear deciding to remove that part of the code.

Share this post


Link to post
Share on other sites
OrionSR
6 hours ago, 𝓦𝓸𝓵𝓯 said:

Probably repair sounds appear deciding to remove that part of the code.

The repair sound is intended to remind you that the script is running so you'll remove the whole script. It's not needed after you save.

Share this post


Link to post
Share on other sites
𝓦𝓸𝓵𝓯
18 minutes ago, OrionSR said:

The repair sound is intended to remind you that the script is running so you'll remove the whole script. It's not needed after you save.

Yeah, understand, maybe it's really useful.

Share this post


Link to post
Share on other sites
CleoModlar
On 2/6/2020 at 3:52 PM, OrionSR said:
{$CLEO .cs}
0001: wait 3000 ms
0A8D: [email protected] = read_memory 0x96D325 size 2 virtual_protect 0
08BA: set [email protected] bit 13
0A8C: write_memory 0x96D325 size 2 value [email protected] virtual_protect 0
09F1: play_audio_at_actor $PLAYER_ACTOR event 1133
0A93: end_custom_thread

This script should change the garage setting to enable Camera Follows Player. The setting should persist in the save so be sure to disable the script until it's needed again.

You are perfect sir, Any tutorial for this camera fix?

Share this post


Link to post
Share on other sites
OrionSR
4 hours ago, CleoModlar said:

You are perfect sir, Any tutorial for this camera fix?

I followed the math described in the post linked below using the Windows Calculator.


Added: (because the bit math is usually a bit awkward)

In the example linked I'm manipulating a single byte based on the reference on garage memory. I've since learned that internally, the game considers this byte and the byte before as a single block of bit flags. So in the example above I'm working with the whole word (16 bits) and altering only the camera flag since I wasn't sure if his door was open or closed. The reference I used to find which bit to flip is listed below.

struct tGarageFlags 
{
    eWordFlags  IsDoorOpen : 1;
    WORD        UnusedFlags : 7;

    eWordFlags  usedModShop : 1;
    eWordFlags  InactiveDoor : 1;
    eWordFlags  usedPnS : 1;
    eWordFlags  SmallDoor : 1;

    eWordFlags  UpAndInDoor : 1;
    eWordFlags  CameraFollowsPlayer : 1;
    eWordFlags  IsDoorClosed : 1;
    eWordFlags  GirlfriendPnS : 1;
};


If you want a wider perspective on garage memory consider examining the structure of garages in the save file using the strategies described in the SA Save File Companion topic. You can get a clearer idea of what you are trying to manipulate and test it in the save before doing the math for a memory edit.

(Crap, looks like I need to update my door states. Won't matter for a static save though.)
 

Edited by OrionSR

Share this post


Link to post
Share on other sites
CleoModlar
9 hours ago, OrionSR said:

I followed the math described in the post linked below using the Windows Calculator.


Added: (because the bit math is usually a bit awkward)

In the example linked I'm manipulating a single byte based on the reference on garage memory. I've since learned that internally, the game considers this byte and the byte before as a single block of bit flags. So in the example above I'm working with the whole word (16 bits) and altering only the camera flag since I wasn't sure if his door was open or closed. The reference I used to find which bit to flip is listed below.

struct tGarageFlags 
{
    eWordFlags  IsDoorOpen : 1;
    WORD        UnusedFlags : 7;

    eWordFlags  usedModShop : 1;
    eWordFlags  InactiveDoor : 1;
    eWordFlags  usedPnS : 1;
    eWordFlags  SmallDoor : 1;

    eWordFlags  UpAndInDoor : 1;
    eWordFlags  CameraFollowsPlayer : 1;
    eWordFlags  IsDoorClosed : 1;
    eWordFlags  GirlfriendPnS : 1;
};


If you want a wider perspective on garage memory consider examining the structure of garages in the save file using the strategies described in the SA Save File Companion topic. You can get a clearer idea of what you are trying to manipulate and test it in the save before doing the math for a memory edit.

(Crap, looks like I need to update my door states. Won't matter for a static save though.)
 

ah god, I didn't understand poorly, For example I want to delete Cj's house garage camera or both of all. I need garage id , door type etc.

 

// HOUSE GARAGE   
0006: [email protected] = 9 // Garage to Modify   // JOHNSON HOUSE
0006: [email protected] = 0x28  // Door Type       // camera follows player

0085: [email protected] = [email protected]         // write address = garage index
0012: [email protected] *= 216       // *= record size
000A: [email protected] += 0x96C048 // += start of garagezone data
000A: [email protected] += 78        // += door flags offset   
0A8C: write_memory [email protected]  size 1 value [email protected] virtual_protect 0 

0A93: end_custom_thread

 

You did good for doherty garage.


0A8D: [email protected] = read_memory 0x96D325 size 2 virtual_protect 0
08BA: set [email protected] bit 13
0A8C: write_memory 0x96D325 size 2 value [email protected] virtual_protect 0
0A93: end_custom_thread

Also El corona house garage camera disables, I noticed.

Bolded values, Means doherty garage camera fix.

 

is it possible for you to explain more simply? How can I found all garage cameras?

Edited by CleoModlar

Share this post


Link to post
Share on other sites
OrionSR

Looks like you came close. This seems a good mix of the two strategies.

0006: [email protected] = 9  // Garage to Modify // Johnson House Garage
0085: [email protected] = [email protected]         // write address = garage index
0012: [email protected] *= 216       // *= record size
000A: [email protected] += 0x96C048  // += start of garagezone data
000A: [email protected] += 77        // write address += door flags offset   
0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0
08BA: set [email protected] bit 13   // camera follows player
0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0

Added: As a word of explanation about the difference between our codes, since you only want to modify the camera flag you could modify the code above to manage a single byte like this.

000A: [email protected] += 78        // write address += door flags offset   
0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0
08BA: set [email protected] bit 5   // camera follows player
0A8C: write_memory [email protected] size 1 value [email protected] virtual_protect 0

However, I prefer to work with a word so I can control both the IsDoorOpen and IsDoorClosed flags at the same time.
Also need to fix the door state for everything to work together.

000A: [email protected] += 77        // write address += door flags offset   
0A8D: [email protected] = read_memory [email protected] size 2 virtual_protect 0
08BA: set [email protected] bit 0    // IsDoorOpen
08C0: clear [email protected] bit 14 // IsDoorClosed
0A8C: write_memory [email protected] size 2 value [email protected] virtual_protect 0

000E: [email protected] -= 15 // offset to DoorState
0A8C: write_memory [email protected] size 4 value 1.0 virtual_protect 0


 

Edited by OrionSR

Share this post


Link to post
Share on other sites
gts.
On 2/6/2020 at 5:52 AM, OrionSR said:
{$CLEO .cs}
0001: wait 3000 ms
0A8D: [email protected] = read_memory 0x96D325 size 2 virtual_protect 0
08BA: set [email protected] bit 13
0A8C: write_memory 0x96D325 size 2 value [email protected] virtual_protect 0
09F1: play_audio_at_actor $PLAYER_ACTOR event 1133
0A93: end_custom_thread

This script should change the garage setting to enable Camera Follows Player. The setting should persist in the save so be sure to disable the script until it's needed again.

Holy molly. This is really useful. Thanks. I hope you can do something like this but for every garage.

Share this post


Link to post
Share on other sites
OrionSR
5 hours ago, gts. said:

Thanks. I hope you can do something like this but for every garage.

You're welcome, I can, and I've provided enough references and links that you can too. So don't wait for me to make what you want.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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