Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Support

    3. Suggestions

need CLEO help, I want to hide this speedometer during cutscenes (San Andreas)


starlone
 Share

Recommended Posts

I've been looking at some other speedometer mods but almost all of them disabled if on mission (using the conditional $ONMISSION == 0 ). I want to enable it on missions too, so i did not include this line. However the speedometer is now still displayed during cutscenes (if CJ is on vehicle), even though the HUDs and radar is already hidden.

 

It becomes ugly since there is no radar and overlapping with the cutscene's black bar and subtitle text.

 

YpnTZn1.png

 

can anyone please correct this CLEO code? I just want to disable that speedometer during cutscenes, but still enabled on missions. here's the code (the first half of the code I took from Wesser's ZoneText mod):

{$CLEO .cs}const   WIDESCREEN_STATUS = [email protected]    IS_IN_WIDESCREEN  = [email protected]   IS_IN_CUTSCENE    = [email protected]      RADAR_MODE        = [email protected]    RADAR_ENABLED     = [email protected]    IS_RADAR_ONSCREEN = [email protected]//-------------MAIN---------------   IS_IN_WIDESCREEN = FALSE   IS_IN_CUTSCENE = FALSE   IS_RADAR_ONSCREEN = TRUE0000: Starting code...while true    wait 0 gosub @WideScreenCheck gosub @CutsceneCheck gosub @GetRadarOnScreen if or   IS_IN_WIDESCREEN == TRUE   IS_IN_CUTSCENE == TRUE   IS_RADAR_ONSCREEN == FALSE then   gosub @ENDING else   gosub @LOAD  endend    :WideScreenCheck0A8D: WIDESCREEN_STATUS = read_memory 0xB6F065 size 4 virtual_protect 0 if     WIDESCREEN_STATUS == 1 then    IS_IN_WIDESCREEN = TRUE else    IS_IN_WIDESCREEN = FALSE endreturn:CutsceneCheckif   06B9: cutscene_data_loaded then  if       82E9: not cutscene_reached_end  then      IS_IN_CUTSCENE = TRUE   endelse  IS_IN_CUTSCENE = FALSE endreturn:GetRadarOnScreen0A8D: RADAR_MODE = read_memory 0xBA676C size 4 virtual_protect 0 0A8D: RADAR_ENABLED = read_memory 0xBAA3FB size 4 virtual_protect 0 if  and    RADAR_MODE == 2     RADAR_ENABLED == 0 then    IS_RADAR_ONSCREEN = FALSE else    IS_RADAR_ONSCREEN = TRUE endreturn:LOADwait 0if and     Player.Defined($PLAYER_CHAR)   Actor.Driving($PLAYER_ACTOR)jf @ENDING   $12410 = Actor.CurrentCar($PLAYER_ACTOR)   0390: load_txd_dictionary "SPEEDOM"   038F: load_texture "STRELK" as 1 // Load dictionary with 0390 first    038F: load_texture "SPEEDO1" as 2 // Load dictionary with 0390 first jump @SPEEDO:SPEEDOwait 0   056E: car $12410 defined   not Car.Wrecked($12410)   not Actor.Dead($PLAYER_ACTOR)   8965: not actor $PLAYER_ACTOR swimming    Actor.Driving($PLAYER_ACTOR)jf @ENDINGif and   IS_IN_WIDESCREEN == FALSE   IS_IN_CUTSCENE == FALSE   IS_RADAR_ONSCREEN == TRUEthen   02E3: $12412 = car $12410 speed     $12412 *= 2.4   02E3: $12413 = car $12410 speed     $12413 *= 2.67     008C: $12413 = float $12413 to_integer   0227: [email protected] = car $12410 health    [email protected] /= 10.0   03E3: set_texture_to_be_drawn_antialiased 1   038D: draw_texture 2 position 102.2 365.0 size 220.0 220.0 RGBA 255 255 255 255    03E3: set_texture_to_be_drawn_antialiased 1   074B: draw_texture 1 position 102.2 361.0 scale 220.0 220.0 angle $12412 RGBA 255 255 255 255   03F0: enable_text_draw 1    0349: set_text_draw_font 2   03E4: set_text_draw_align_right 1   060D: draw_text_shadow 0 rgba 225 225 225 225    0340: set_text_draw_RGBA 225 225 225 255    033F: set_text_draw_letter_size 0.5 1.9   045A: draw_text_1number 195.0 372.0 GXT 'MTR_1' number $12413   03E4: set_text_draw_align_right 1   060D: draw_text_shadow 0 rgba 225 225 225 225    033E: set_draw_text_position 195.0 387.0 GXT 'MTR_2'   0349: set_text_draw_font 2   033F: set_text_draw_letter_size 0.3 1.6   03E4: set_text_draw_align_right 1   060D: draw_text_shadow 0 rgba 225 225 225 225    0340: set_text_draw_RGBA 225 225 225 255    045A: draw_text_1number 170.0 410.0 GXT 'MTR_3' number [email protected]   jump @SPEEDOelse   jump @ENDINGend:ENDINGCar.RemoveReferences($12410)0391: release_textures return

I don't have much knowledge about CLEO coding (or any coding at all) but really interested with GTA modding, particularly San Andreas. I only know about basic stuff, that's why I can only copy other's code and then modify it. so I hope anyone can correct the mistakes in this code or give me a better/simpler code for this issue.

 

Thanks.

 

 

 

Link to comment
Share on other sites

When your code jumps to label @SPEEDO you are entering in a new loop. So you are not checking the Widescreen/Radar/Cutscenes conditions in your previous loop.

 

Just add those checkings in your new loop:

:SPEEDOwait 0   056E: car $12410 defined   not Car.Wrecked($12410)   not Actor.Dead($PLAYER_ACTOR)   8965: not actor $PLAYER_ACTOR swimming    Actor.Driving($PLAYER_ACTOR)jf @ENDINGgosub @WideScreenCheckgosub @CutsceneCheckgosub @GetRadarOnScreenif and   IS_IN_WIDESCREEN == FALSE   IS_IN_CUTSCENE == FALSE   IS_RADAR_ONSCREEN == TRUEthen    // ....
Link to comment
Share on other sites

thanks, i will try.

----

edit:

 

It works!

thank you very much

Edited by starlone
Link to comment
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
 Share

  • 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.