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

making a menu


Bad.boy!
 Share

Recommended Posts

I'm trying to make a menu, but I'm not sure how to do it. I looked at Dutchy's tutorial, but I don't really understand how to activate rows and show a new menu.

 

 

{$CLEO .cs}Thread 'GUN':GUN_1wait 0if Player.Defined($PLAYER_CHAR)jf @GUN_1:GUN_2wait 0if 0AB0:  key_pressed 71jf @GUN_2wait 100if 0AB0:  key_pressed 85jf @GUN_2wait 100if0AB0: key_pressed 78jf @GUN_208DB:  set_panel [email protected] column 0 header 'WEAPONS' data 'MELEE' 'PISTOL' 'SHOTGUN' 'SUBMACHINEGUN' 'ASSAULT_RIFLES' 'RIFLE' 'SNIPER' 'GRENADE' 'HEAVY' 'HEALT' 'DUMMY' 'DUMMY':GUN_3wait 0if0AB0: key_pressed 32jf @GUN_308DA: remove_panel [email protected]???

 

 

Activates when you type gun, space to select (f to leave menu)

Link to comment
Share on other sites

ZAZs whether menu is a pretty good example of how to make a menu. I used it as template for making my weapon menu.

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007{$VERSION 3.1.0027}{$CLEO .cs}//-------------MAIN---------------03A4: name_thread 'WHELP' :WHELP_110001: wait 20 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @WHELP_11 00D6: if 03EE:   player $PLAYER_CHAR controllable 004D: jump_if_false @WHELP_11 00D6: if and80DF:   not actor $PLAYER_ACTOR driving 0AB0:   key_pressed 49 004D: jump_if_false @WHELP_11 00D6: if 0038:   $ONMISSION == 0 004D: jump_if_false @WHELP_11 00D6: if 0038:   $Active_Interior == 0 004D: jump_if_false @WHELP_11 0001: wait 1000 ms 0050: gosub @WHELP_819 0343: set_text_draw_linewidth 680.0 033E: set_draw_text_position 36.0 20.0 GXT 'TATTA'  // Use ~k~~GO_FORWARD~ and ~k~~GO_BACK~ to select an area.~N~~k~~PED_SPRINT~ Select~N~~k~~VEHICLE_ENTER_EXIT~ Quit01B4: set_player $PLAYER_CHAR can_move 0 03BF: set_player $PLAYER_CHAR ignored_by_everyone 1 0826: enable_hud 0 03BF: set_player $PLAYER_CHAR ignored_by_everyone 1 08D4: $WETTER5 = create_panel_with_title 'CHEAT7' position 340.0 120.0 width 240.0 columns 1 interactive 1 background 1 alignment 0  // Weather cheat08DB: set_panel $WETTER5 column 0 header 'PLA_19' data 'DEBW1' 'DEBW4' 'DEBW5' 'DEBW8' 'DEBW9' 'DEBW10' 'DEBW12' 'DEBW14' 'DEBW16' 'DEBW17' 'DEBW18' 'WEATH0'  // SELECT // SUNNY LA // CLOUDY LA // SUNNY SF // RAINY SF // FOGGY SF // SUNNY VEGAS // CLOUDY VEGAS // SUNNY COUNTRYSIDE // RAINY COUNTRYSIDE // EXTRA SUNNY DESERT // SANDSTORN DESERT // WEATHER NORMAL090E: set_panel $WETTER5 active_row 0 :WHELP_3360001: wait 0 ms 00D6: if 0256:   player $PLAYER_CHAR defined 004D: jump_if_false @WHELP_760 00D6: if 00E1:   player 0 pressed_key 15 004D: jump_if_false @WHELP_380 0002: jump @WHELP_760 :WHELP_38000D6: if 00E1:   player 0 pressed_key 16 004D: jump_if_false @WHELP_336 03E6: remove_text_box 08D7: $WGO5 = panel $WETTER5 active_row 0008: $WGO5 += 1 00D6: if 0038:   $WGO5 == 1 004D: jump_if_false @WHELP_443 01B6: set_weather 1 0002: jump @WHELP_336 :WHELP_44300D6: if 0038:   $WGO5 == 2 004D: jump_if_false @WHELP_472 01B6: set_weather 4 0002: jump @WHELP_336 :WHELP_47200D6: if 0038:   $WGO5 == 3 004D: jump_if_false @WHELP_501 01B6: set_weather 5 0002: jump @WHELP_336 :WHELP_50100D6: if 0038:   $WGO5 == 4 004D: jump_if_false @WHELP_530 01B6: set_weather 8 0002: jump @WHELP_336 :WHELP_53000D6: if 0038:   $WGO5 == 5 004D: jump_if_false @WHELP_559 01B6: set_weather 9 0002: jump @WHELP_336 :WHELP_55900D6: if 0038:   $WGO5 == 6 004D: jump_if_false @WHELP_588 01B6: set_weather 10 0002: jump @WHELP_336 :WHELP_58800D6: if 0038:   $WGO5 == 7 004D: jump_if_false @WHELP_617 01B6: set_weather 12 0002: jump @WHELP_336 :WHELP_61700D6: if 0038:   $WGO5 == 8 004D: jump_if_false @WHELP_646 01B6: set_weather 14 0002: jump @WHELP_336 :WHELP_64600D6: if 0038:   $WGO5 == 9 004D: jump_if_false @WHELP_675 01B6: set_weather 16 0002: jump @WHELP_336 :WHELP_67500D6: if 0038:   $WGO5 == 10 004D: jump_if_false @WHELP_704 01B6: set_weather 17 0002: jump @WHELP_336 :WHELP_70400D6: if 0038:   $WGO5 == 11 004D: jump_if_false @WHELP_733 01B6: set_weather 19 0002: jump @WHELP_336 :WHELP_73300D6: if 0038:   $WGO5 == 12 004D: jump_if_false @WHELP_336 01B7: release_weather 0002: jump @WHELP_760 :WHELP_76008DA: remove_panel $WETTER5 0826: enable_hud 1 03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 01B4: set_player $PLAYER_CHAR can_move 1 03F0: enable_text_draw 0 0002: jump @WHELP_11 08DA: remove_panel $WETTER5 01B4: set_player $PLAYER_CHAR can_move 1 03BF: set_player $PLAYER_CHAR ignored_by_everyone 0 03F0: enable_text_draw 0 0051: return :WHELP_8190340: set_text_draw_RGBA 180 180 180 255 033F: set_text_draw_letter_size 0.5 2.5 03E4: enable_text_draw_align_right 0 0341: unknown_text_draw_flag 0 0342: enable_text_draw_centered 0 0343: set_text_draw_linewidth 200.0 0348: enable_text_draw_proportional 1 0345: enable_text_draw_background 0 0051: return 

 

Link to comment
Share on other sites

Also it's better to use a jumptable instead of tons of "if var == X" checks.

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.