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!

Help with Menu Code


ReeferSmoke
 Share

Recommended Posts

ReeferSmoke

Here is my code:

 

0004: $CORDOFF1 = 1 0004: $CORDOFF2 = 1 :MOD_MENU_103A4: name_thread 'MODMENU':MOD_MENU_20001: wait  250 ms00D6: if  00256:   player $PLAYER_CHAR defined004D: jump_if_false ££MOD_MENU_200D6: if  203EE:   player $PLAYER_CHAR controllable80DF:   NOT  actor $PLAYER_ACTOR driving00E1:   key pressed  0  8; Group Control Forward;00E1:   key pressed  0  4; Action004D: jump_if_false ££MOD_MENU_2 0050: gosub ££ON_OFF_1;054C: use_GXT_table 'MAIN'0512: permanent text box 'CLOTHA'0581: toggle_radar  0 (off)01B4: set player $PLAYER_CHAR frozen_state  0 (frozen)08D4: @0 = create_panel_with_title 'FET_OPT' position  29.0  145.0 width  186.0 columns  2 interactive  1 background  1 alignment  108DB: set_panel @0  column  0 header 'DUMMY' data 'ZCOORD' 'ZCOORD' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'08DB: set_panel @0  column  1 header 'DUMMY' data [email protected] [email protected] 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'09DB: set_panel @0  column  0 width  16509DB: set_panel @0  column  1 width  50       090E: set_panel @0 active_row @1:MOD_MENU_30001: wait  0 ms00D6: if  000E1:   key_pressed  0  15004D: jump_if_false ££MOD_MENU_408DA: remove_panel @003E6: remove_text_box0581: toggle_radar  1 (on)01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0002: jump ££MOD_MENU_2:MOD_MENU_400D6: if  000E1:   key_pressed  0  16004D: jump_if_false ££MOD_MENU_308D7: @1 = panel @0 active_row08DA: remove_panel @003E6: remove_text_box0581: toggle_radar  1 (on)01B4: set_player $PLAYER_CHAR frozen_state  1 (unfrozen)0871: init_jump_table @1 total_jumps  2  0 ££MOD_MENU_5 jumps  0 ££MOD_MENU_5  1 ££MOD_MENU_6  2 ££MOD_MENU_5  3 ££MOD_MENU_5  4 ££MOD_MENU_5  5 ££MOD_MENU_5  6 ££MOD_MENU_50872: jump_table_jumps  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5  -1 ££MOD_MENU_5:MOD_MENU_5; selected button 'ZCOORD' (1)00D6: if  0 0038:   $CORDOFF1 ==  1;; integer values004D: jump_if_false ££MOD_MENU_5a 0004: $CORDOFF1 =  0;; integer values 0002: jump ££MOD_MENU_2  :MOD_MENU_5a0004: $CORDOFF1 =  1;; integer values0002: jump ££MOD_MENU_2 :MOD_MENU_6; selected button 'ZCOORD' (2)00D6: if  0 0038:   $CORDOFF2 ==  1;; integer values004D: jump_if_false ££MOD_MENU_6a 0004: $CORDOFF2 =  0;; integer values 0002: jump ££MOD_MENU_2:MOD_MENU_6a0004: $CORDOFF2 =  1;; integer values0002: jump ££MOD_MENU_2:ON_OFF_100D6: if  0 0038:   $CORDOFF1 ==  1;; integer values004D: jump_if_false ££ON_OFF_2 05AA: [email protected] = 'FEM_ON';; 8-byte strings0002: jump ££ON_OFF_3 :ON_OFF_205AA: [email protected] = 'FEM_OFF';; 8-byte strings0051: return:ON_OFF_300D6: if  0 0038:   $CORDOFF2 ==  1;; integer values004D: jump_if_false ££ON_OFF_4 05AA: [email protected] = 'FEM_ON';; 8-byte strings0051: return:ON_OFF_405AA: [email protected] = 'FEM_OFF';; 8-byte strings0051: return 

 

 

My problem is in the "ON_OFF_" [email protected] seems to display right all the time, but [email protected] displays wrong if [email protected] $CORDOFF1 = 1. It might be my jumps. Not sure though. Any help would be appreciated. Thanks.

 

EDIT: shortly after posting, I figured it out. I didn't need the "0051: return" in "ON_OFF_2". I just couldn't see it at first. turn.gif This code works fine. Any insight would be appreciated though..

Edited by ReeferSmoke
Link to comment
Share on other sites

random_download

If you go line-by-line through your code as if you were the game engine, you will often find the error(s) in it:

 

:ON_OFF_100D6: if  00038:   $CORDOFF1 ==  1;; integer values   <--- if this is false004D: jump_if_false ££ON_OFF_2                 <--- go here05AA: [email protected] = 'FEM_ON';; 8-byte strings0002: jump ££ON_OFF_3:ON_OFF_2                  <--- then here05AA: [email protected] = 'FEM_OFF';; 8-byte strings       <--- [email protected] is correct0051: return                <--- then we return without setting [email protected] If we removed this line:ON_OFF_3        <--- we end up here00D6: if  00038:   $CORDOFF2 ==  1;; integer values004D: jump_if_false ££ON_OFF_405AA: [email protected] = 'FEM_ON';; 8-byte strings           <--- and [email protected] is set to on0051: return:ON_OFF_405AA: [email protected] = 'FEM_OFF';; 8-byte strings           <--- or off0051: return

 

Link to comment
Share on other sites

ReeferSmoke

Thanks for the reply Random. I see that just a minute after your post, I posted my edit.. Thanks again though.

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.