Rafalema Posted May 21, 2009 Share Posted May 21, 2009 Could someone send me base script for a panel/menu of 4 choices? I will add my own stuff there later, But can anyone of you guys do that to me? Thank you! Link to comment Share on other sites More sharing options...
gtasearcher Posted May 21, 2009 Share Posted May 21, 2009 Here, bud Link to comment Share on other sites More sharing options...
emuk Posted May 22, 2009 Share Posted May 22, 2009 sorry for my intrusion but how can I open another menu with other choices to choice 0 for example? thanks Link to comment Share on other sites More sharing options...
PatrickW Posted May 23, 2009 Share Posted May 23, 2009 Just add the full code for a new (sub) menu between : if $choice == 0then...end Thus if the user selects a specific option from the menu, you will generate a new (different) submenu. Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 but this is for 1 choice. I want to do: (for example) 08DB: set_panel $MENU column 0 header 'DUMMY' data 'example1' 'example2' 'example3' 'example4' 'example5' ... ... if $ choice == 0 then 3 more options here ('example6' 'example7' 'example8') end can be done? Link to comment Share on other sites More sharing options...
Dutchy3010 Posted May 23, 2009 Share Posted May 23, 2009 So you want a menu, and after you selected something in that menu, there will be another menu? If yes, you have to do it as follows: 08D4: $MENU = create_panel_with_title 'DUMMY' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 108DB: set_panel $MENU column 0 header 'DUMMY' data 'example1' 'example2' 'example3' 'example4' 'example5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'repeatwait 0 msif 00E1: player 0 pressed_key 15then 08DA: remove_panel $MENU 03E6: remove text box jump @ENDenduntil 00E1: player 0 pressed_key 1608D7: $choice = panel $MENU active_row08DA: remove_panel $MENU03E6: remove text boxif $choice == 0then 08D4: $MENU = create_panel_with_title 'DUMMY' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 1 08DB: set_panel $MENU column 0 header 'DUMMY' data 'example1' 'example2' 'example3' 'example4' 'example5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' repeat wait 0 ms if 00E1: player 0 pressed_key 15 then 08DA: remove_panel $MENU 03E6: remove text box jump @END end until 00E1: player 0 pressed_key 16 08D7: $choice = panel $MENU active_row 08DA: remove_panel $MENU 03E6: remove text box if $choice == 0 then ... endend So in the if $choice ==0, you have to create another menu. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 So you want a menu, and after you selected something in that menu, there will be another menu? If yes, you have to do it as follows: 08D4: $MENU = create_panel_with_title 'DUMMY' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 108DB: set_panel $MENU column 0 header 'DUMMY' data 'example1' 'example2' 'example3' 'example4' 'example5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'repeatwait 0 msif 00E1: player 0 pressed_key 15then 08DA: remove_panel $MENU 03E6: remove text box jump @ENDenduntil 00E1: player 0 pressed_key 1608D7: $choice = panel $MENU active_row08DA: remove_panel $MENU03E6: remove text boxif $choice == 0then 08D4: $MENU = create_panel_with_title 'DUMMY' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 1 08DB: set_panel $MENU column 0 header 'DUMMY' data 'example1' 'example2' 'example3' 'example4' 'example5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' repeat wait 0 ms if 00E1: player 0 pressed_key 15 then 08DA: remove_panel $MENU 03E6: remove text box jump @END end until 00E1: player 0 pressed_key 16 08D7: $choice = panel $MENU active_row 08DA: remove_panel $MENU 03E6: remove text box if $choice == 0 then ... endend So in the if $choice ==0, you have to create another menu. tried, but instead to open up another menu, it closes all Link to comment Share on other sites More sharing options...
Dutchy3010 Posted May 23, 2009 Share Posted May 23, 2009 Show us your code, else we can't look for the mistake. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 I understand alone, had to add a break otherwise,you have to leave the button, quickly. thanks for yours helps Link to comment Share on other sites More sharing options...
Dutchy3010 Posted May 23, 2009 Share Posted May 23, 2009 Indeed! But you can also use an opcode for that: repeat wait 0until 80E1: not player 0 pressed_key 16 This way you are absolutely sure that the player doesn't hold the key, even after a (long) wait. To make a code safe, you can use this right after every key press condition. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 you can tell me the pressed_key of f2/f12 keys? thanks for all ,you are great! Link to comment Share on other sites More sharing options...
ZAZ Posted May 23, 2009 Share Posted May 23, 2009 you can tell me the pressed_key of f2/f12 keys?thanks for all ,you are great! needs to use cleo opcode 0AB0: read this by questions about key_press CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 (edited) i'v read but I have not found the keys f2/f12 or at least do not match Edited May 23, 2009 by emuk Link to comment Share on other sites More sharing options...
ZAZ Posted May 23, 2009 Share Posted May 23, 2009 i'v read but I have not found the keys f2/f12 or at least do not match are you using sannybuilder newest version or have you never looked in the sanny help? or you didnt read carefull Sannybuilder HELP: CLEO 3 Code Library >> Virtual key codes (for 0AB0) you should find then a list and f2, f12 is also available CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
emuk Posted May 23, 2009 Share Posted May 23, 2009 sorry,I looked in the wrong section xD (scm not cleo) many thanks 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