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

Happy Holidays from the GTANet team!

[SA] Engine on/off display


aStiffSausage
 Share

Recommended Posts

aStiffSausage

I added engine on/off display on speedometer, which worked fine. I tried to make engine on/off display as invidual script, so you can choose if you want it or not. But after I "ripped" the script to it's own script, it now crashes in few seconds after I get in. It works perfectly if I'm not using the engine-display...

 

 

{$CLEO .cs}0000: NOP 0A95: enable_thread_saving :Check0001: wait 0 ms 00D6: if and00DF:   actor $PLAYER_ACTOR driving 0038:   $ACTIVE_INTERIOR == 0 84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 84A7:   not actor $PLAYER_ACTOR driving_boat 004D: jump_if_false @Check 0811: [email protected] = actor $PLAYER_ACTOR car // versionC 0390: load_txd_dictionary "SPEED1" 038F: load_texture "ENGOFF" as 20 // Load dictionary with 0390 first 038F: load_texture "ENGON" as 21 // Load dictionary with 0390 first 038F: load_texture "BACKTINY" as 22 // Load dictionary with 0390 first 038F: load_texture "BACKTINYN" as 23 // Load dictionary with 0390 first 0001: wait 0 ms 0002: jump @Day:Day0001: wait 0 ms 00D6: if and00DF:   actor $PLAYER_ACTOR driving 0038:   $ACTIVE_INTERIOR == 0 004D: jump_if_false @NotDriving 00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes 00D6: if and0029:   [email protected] >= 6 001B:   20 > [email protected] 004D: jump_if_false @Night0227: [email protected] = car [email protected] health0017: [email protected] /= 3.9215687 0227: [email protected] = car [email protected] health 0017: [email protected] /= 3.92156870012: [email protected] *= -103E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 22 position 450.0 360.0 size 40.0 40.0 RGBA 255 255 255 255jump @EngineCheck  :EngineCheckif0ABE:   vehicle [email protected] engine_onelse_jump @EngineOffDay03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 21 position 450.0 360.0 size 40.0 40.0 RGBA [email protected] [email protected] 0 255 jump @NONAME_704:EngineOffDay03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 20 position 450.0 360.0 size 40.0 40.0 RGBA [email protected] [email protected] 0 255 jump @NONAME_704:NONAME_70400D6: if 03C9:   car [email protected] damaged 004D: jump_if_false @Day0003: shake_camera 40  //03E3: set_texture_to_be_drawn_antialiased 1 //038D: draw_texture 19 position [email protected] [email protected] size 140.0 [email protected] RGBA 255 255 255 255 0002: jump @Day:Night0001: wait 0 ms 00D6: if and00DF:   actor $PLAYER_ACTOR driving 0038:   $ACTIVE_INTERIOR == 0 004D: jump_if_false @NotDriving00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes 00D6: if or0029:   [email protected] >= 20 001B:   6 > [email protected]: jump_if_false @Day0227: [email protected] = car [email protected] health0017: [email protected] /= 3.9215687 0227: [email protected] = car [email protected] health 0017: [email protected] /= 3.92156870012: [email protected] *= -103E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 22 position 450.0 360.0 size 40.0 40.0 RGBA 255 255 255 255jump @EngineCheckNight :EngineCheckNightif0ABE:   vehicle [email protected] engine_onelse_jump @EngineOffNight03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 21 position 450.0 360.0 size 40.0 40.0 RGBA [email protected] [email protected] 0 255jump @NightDamage:EngineOffNight03E3: set_texture_to_be_drawn_antialiased 1 038D: draw_texture 20 position 450.0 360.0 size 40.0 40.0 RGBA [email protected] [email protected] 0 255 jump @NightDamage:NightDamage00D6: if 03C9:   car [email protected] damaged 004D: jump_if_false @Night0003: shake_camera 40  //03E3: set_texture_to_be_drawn_antialiased 1 //038D: draw_texture 19 position [email protected] [email protected] size 140.0 [email protected] RGBA 255 255 255 2550002: jump @Night:NotDriving0001: wait 0 ms 03F0: enable_text_draw 0 0002: jump @Check  

 

Link to comment
Share on other sites

You never enabled text draw.

 

 

03F0: enable_text_draw 1

 

user posted image
Link to comment
Share on other sites

aStiffSausage

 

You never enabled text draw.

 

 

03F0: enable_text_draw 1

 

Ahhh, the basics... suicidal.gif

 

Thanks a lot, I wouldn't have noticed that one turn.gif

 

Btw, how can I check if HUD is enabled? Didn't find any opcodes for it...

 

Would this work?

 

 

$HUD == 1

 

 

 

And one more thing...

 

How I can get current car's name and current area/location? I mean a bit like Wesser's Windshield GUI and ZoneText-mods, but without using he's scripts (too complex for me) biggrin.gif

Edited by oksa8
Link to comment
Share on other sites

 

Btw, how can I check if HUD is enabled? Didn't find any opcodes for it...

 

 

0A8D: [email protected] = read_memory 0xBA6769 size 1 virtual_protect 0  // Is HUD enabled in display options0A8D: [email protected] = read_memory 0xA444A0 size 1 virtual_protect 0   // Is HUD enabled by an opcode 0826// These memory addresses work on GTA San Andreas v1.0 [uS] HOODLUM No-CD  Fixed EXEif [email protected] == [email protected] == trueelse_jump @disabled_hud   // HUD is disabled....

 

Link to comment
Share on other sites

aStiffSausage

 

Btw, how can I check if HUD is enabled? Didn't find any opcodes for it...

 

 

0A8D: [email protected] = read_memory 0xBA6769 size 1 virtual_protect 0  // Is HUD enabled in display options0A8D: [email protected] = read_memory 0xA444A0 size 1 virtual_protect 0   // Is HUD enabled by an opcode 0826// These memory addresses work on GTA San Andreas v1.0 [uS] HOODLUM No-CD  Fixed EXEif [email protected] == [email protected] == trueelse_jump @disabled_hud   // HUD is disabled....

 

Thank you once again... Maybe I should also try GTAModding for answers? blush.gif

 

@fastman92

 

Some time ago you posted this little "script"...

 

 

   0A97: [email protected] = car [email protected] struct  [email protected] += 1412  0A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0  

 

 

No complaining, I've managed to got it to work, but instead of 1/0, what you told it to be, it seems to have multiple values depending on which lights are shown. For example, 0 means no lights visible, but it also happens when you've broken both front lamps and watch the vehicle from front. And if value is 15, you're watching the vehicle from back with all lights functioning, but if you change camera to the front, it will change to 3.

 

Is there any other way to check if lights are on? confused.gif

Edited by oksa8
Link to comment
Share on other sites

aStiffSausage

Little bump...

 

I'm still figuring out how I can check if car has lights enabled, which isn't functioning as wierdly as the code-snippet posted above...

 

 

EDIT: Finally. After months of waiting, I got my speedlimit mod to work smile.gif I still need help with it...

 

How I can check if player is on a freeway (motorway, highway, what's it called?)?

What are the names of "special" clothes received from girlfriends?

 

Hopefully you can answer me soon smile.gif

Edited by oksa8
Link to comment
Share on other sites

 

0A97: [email protected] = car [email protected] [email protected] += 14120A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0{states:0: Default - off in day and off at night1: Off, no matter what time2: On, no matter what time}       if or       [email protected] == 0     // Lights default - off in day and off at night       [email protected] == 1     // Lights off, no matter what time               then       067F: set_car [email protected] lights 2       00BC: show_text_highpriority GXT 'LIGHTON' time long_comunique flag 1       else       067F: set_car [email protected] lights 1       00BC: show_text_highpriority GXT 'LIGHTOF' time long_comunique flag 1       end    

 

Part of Remote lock car 3.6

Link to comment
Share on other sites

aStiffSausage

Fastman92

 

 

0A97: [email protected] = car [email protected] [email protected] += 14120A8D: [email protected] = read_memory [email protected] size 1 virtual_protect 0

 

 

If you display that on screen, you'll see values aren't 0/1/2, they depend from various things: If light is damaged, if camera is pointed from front, and each light has different value.

 

If all lights are on and camera is pointed from behind, value is 15

If all lights are on, but camera is pointed from front, value is 3

 

And so on, but that isn't really suitable as a check if you need to display texture on-screen all the time, as if you spin camera and your headlights are broken, the texture would be changing...

 

Is there any way to fix that camera-turning? Or to check if rear-lights aren't damaged? As those might help a lot smile.gif

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.