Bad.boy! Posted May 21, 2011 Share Posted May 21, 2011 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 More sharing options...
TheSiggi Posted May 21, 2011 Share Posted May 21, 2011 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 More sharing options...
ZAZ Posted May 21, 2011 Share Posted May 21, 2011 ZAZs whether menu is a pretty good example of how to make a menu. I used it as template for making my weapon menu. did i used globals in my weathermenue? CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
TheSiggi Posted May 21, 2011 Share Posted May 21, 2011 I guess. Must've been an old script Link to comment Share on other sites More sharing options...
Silent Posted May 21, 2011 Share Posted May 21, 2011 Also it's better to use a jumptable instead of tons of "if var == X" checks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now