IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules GTA Modification Forums

Please post mod releases in the Mod Showroom

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Double Menu

 
Revolution-Designes  
Posted: Friday, Jul 13 2012, 18:16
Quote Post


AKA JopperX9
Group Icon
Group: Members
Joined: Dec 28, 2008

eu.gif

Member Award




Hi all,

Got another coding problem. I want to create an option in San Andreas that when the player presses the '9' key, a menu will pop up. When I insert my code in the main.scm and run the piece of code as a thread it doesn't work properly. Two menus will show up and when I select a menu-option or press enter to exit the menu one of the two menus will disappear and I can move again while the remaining menu still remains. You can also scroll through by pressing the arrow keys or wasd, you can't select/choose an option though.

Screens:

user posted image

user posted image

But here is the weird part. As soon as I put the exact same piece of code in a cleo script it works completely fine.

Here's the code:

CODE

:HELP
wait 0
if and
0038:   $ONMISSION == 0
0038:   $SAVEFIX1 == 0
0AB0:  key_pressed 57
jf @HELP
//0008: $HELP += 1
jump @HELPM2

:HELPM1
wait 0
08DA: remove_panel $MENU
03E6: remove_text_box
Player.CanMove($PLAYER_CHAR) = True
//000C: $HELP -= 1
jump @HELP
                 
:HELPM2
Player.CanMove($PLAYER_CHAR) = false
0512: show_permanent_text_box 'CLOTHA'
08D4: $MENU = create_panel_with_title 'HELPM' position 29.0 145.0 width 220.0 columns 1 interactive 1 background 1 alignment 1
08DB: set_panel $MENU column 0 header 'HELPM1' data 'HELP1' 'HELP2' 'HELP3' 'HELP4' 'HELP5' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
gosub @HELPM3
0871: init_jump_table $ROW total_jumps 5 default_jump 0 @HELPM1  jumps 0 @HELPC1 1 @HELPC2 2 @HELPC3 3 @HELPC4 4 @HELPC5 5  @HELPC6 6 @HELPC7
0872: jump_table_jumps 7 @HELPC8 8  @HELPC9 9 @HELPC10 10 @HELPC11 11 @HELPC12 12 @HELPC12 13  @HELPC12 14 @HELPC12 15 @HELPC12

:HELPC1
08D4: $HMENU = create_panel_with_title 'HELP1' position 29.0 35.0 width 230.0 columns 1 interactive 0 background 1 alignment 1
08DB: set_panel $HMENU column 0 header 'HELP1A' data 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'
jump @HELPCHOICE1A

:HELPCHOICE1A
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPCHOICE1A
08DA: remove_panel $HMENU
wait 150
jump @HELPM2
               
:HELPC2
08D4: $HMENU = create_panel_with_title 'HELP2' position 29.0 35.0 width 230.0 columns 1 interactive 0 background 1 alignment 1
08DB: set_panel $HMENU column 0 header 'HELP2A' data 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'
jump @HELPCHOICE2A

:HELPCHOICE2A
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPCHOICE2A
08DA: remove_panel $HMENU
wait 150
jump @HELPM2
               
:HELPC3
08D4: $HMENU = create_panel_with_title 'HELP3' position 29.0 35.0 width 230.0 columns 1 interactive 0 background 1 alignment 1
08DB: set_panel $HMENU column 0 header 'HELP3A' data 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'X'
jump @HELPCHOICE3A

:HELPCHOICE3A
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPCHOICE3A
08DA: remove_panel $HMENU
wait 150
jump @HELPM2
               
:HELPC4
08D4: $HMENU = create_panel_with_title 'HELP4' position 29.0 35.0 width 230.0 columns 1 interactive 0 background 1 alignment 1
08DB: set_panel $HMENU column 0 header 'HELP4A' data 'X' 'X' 'X' 'X' 'X' 'X' 'X' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
jump @HELPCHOICE4A

:HELPCHOICE4A
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPCHOICE4A
08DA: remove_panel $HMENU
wait 150
jump @HELPM2  
               
:HELPC5
08D4: $HMENU = create_panel_with_title 'HELP5' position 29.0 35.0 width 230.0 columns 1 interactive 0 background 1 alignment 1
08DB: set_panel $HMENU column 0 header 'HELP5A' data 'X' 'X' 'X' 'X' 'X' 'X' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'
jump @HELPCHOICE5A

:HELPCHOICE5A
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPCHOICE5A
08DA: remove_panel $HMENU
wait 150
jump @HELPM2
               
:HELPC6
jump @HELPM2
               
:HELPC7
jump @HELPM2
               
:HELPC8
jump @HELPM2
               
:HELPC9
jump @HELPM2
               
:HELPC10
jump @HELPM2
               
:HELPC11
jump @HELPM2
               
:HELPC12
jump @HELPM2

:HELPM3
wait 0
if
00E1:   player 0 pressed_key 15 //enter
jf @HELPM4
jump @HELPM1
               
:HELPM4
wait 0
if
00E1:   player 0 pressed_key 16 //spatie
jf @HELPM3
08D7: $ROW = panel $MENU active_row
08DA: remove_panel $MENU
03E6: remove_text_box
               
:HELPM5
wait 0
if
80E1:   not player 0 pressed_key 16
jf @HELPM5
return


Anyone knows a solution?
Users WebsitePMMSN
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG