GTA: Modification Area
Would you like to react to this message? Create an account in a few clicks or log in to continue.
GTA: Modification Area

A website for the GTA modding scene

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Big-game starts raising Schneider's profile
Creating a Menu EmptySun Mar 04, 2012 2:28 am by lavivi

» [Help] cleo created lighting
Creating a Menu EmptyThu Oct 14, 2010 1:03 am by findmy012

» Mission Question
Creating a Menu EmptyThu Oct 14, 2010 1:02 am by findmy012

» [IV] Spoiler Script
Creating a Menu EmptyThu Oct 14, 2010 1:02 am by findmy012

» Mission mod [help]
Creating a Menu EmptySat Sep 18, 2010 5:50 pm by jayd00

» Bc7 Mod Help
Creating a Menu EmptyFri Aug 20, 2010 11:19 am by pengpeng

» Found a bug
Creating a Menu EmptyFri Dec 18, 2009 4:22 am by _CJ360_

» [IV] Novitec Rosso 599 GTB
Creating a Menu EmptyTue Nov 17, 2009 4:22 pm by Kotton

» Hello/Guidance Request
Creating a Menu EmptyMon Oct 12, 2009 6:45 am by Adler

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Affiliates
image

Image

Image

Image

Image

Image

Image

Image

Image

Image

image

Image

steve-m.com

Image


----- Русский -----

Если ваш сайт содержит большую коллекцию SCM/CLEO-скриптов (больше 16), напишите на мой e-mail, и я добавлю его в список. Приветствуются скрипты, которые не встречаются на других сайтах ... Спасибо. ))))


----- English -----

If your website has a big enough collection of SCM/CLEO scripts (more than 16) notify me by e-mail
, and I will add it to the list. The unique scripts are preferable ... Thank you. ))))
Log in

I forgot my password



November 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
252627282930 

Calendar Calendar


You are not connected. Please login or register

Creating a Menu

Go down  Message [Page 1 of 1]

1Creating a Menu Empty Creating a Menu Sat Feb 07, 2009 5:32 am

gtasbigfoot

gtasbigfoot
Admin

Menus work by buttons.
First you need to setup the column with:

Code:

08D4: 4@ = create_panel_with_title 'DUMMY' position 340.0 120.0 width 240.0 columns 1 interactive 1 background 1 alignment 0

Then create the menus contents with 08DB:

Code:

08DB: set_panel 4@ column  0 header 'DUMMY' data 'INFERNU' 'BULLET' 'TURISMO' 'CHEETAH' 'SULTAN' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY'

Then activate the panel with 090E:

Code:

090E: set_panel 4@ active_row  0

The up/down function is automatically to the up/down arrow keys.
Check in following loop key press and if key is pressed, get the value of the active button place:

Code:

08D7: 5@ = panel 4@ active_row

"DUMMY" is nothing. The max number for entry's in one panel is 12(0xC) if you do not need to
use up all of them, you can mark them as dummy's.

When the menu is not needed anymore remove it:

Code:

08DA: remove_panel 4@

Here is a example script, showing how the menu works. Look into the script:

Code:

{$CLEO .cs}
0000: // Type "TEST" like a cheat, to call the menu

:Menu_01
0001: wait 0 ms
0006: 30@ = -0x38214
00D6: if
0038:  &0(30@,1i) == 0x54455354       
004D: jump_if_false @Menu_01
0004: &0(30@,1i) = 0x54455300
03E5: show_text_box 'CHEAT1'  // Cheat activated

0343: set_text_draw_linewidth 680.0
033E: set_draw_text_position 36.0 20.0 GXT 'TATTA' 
01B4: set_player $PLAYER_CHAR can_move 0
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
0826: enable_hud 0
08D4: 4@ = create_panel_with_title 'DUMMY' position 340.0 120.0 width 240.0 columns 1 interactive 1 background 1 alignment 0
08DB: set_panel 4@  column 0 header 'DUMMY' data 'INFERNU' 'BULLET' 'TURISMO' 'CHEETAH' 'SULTAN' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 'DUMMY' 
090E: set_panel 4@  active_row 0
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 0.0


:Menu_02
0001: wait  0 ms
00D6: if
0256:  player $PLAYER_CHAR defined
004D: jump_if_false @Remove_Menu
00D6: if 
00E1:  player 0 pressed_key 15
004D: jump_if_false @Menu_03
0002: jump @Remove_Menu

:Menu_03
0001: wait  0 ms
00D6: if 
00E1:  player 0 pressed_key 16
004D: jump_if_false @Menu_02
08D7: 5@ = panel 4@ active_row
0008: 5@ +=  1

:Menu_05
00D6: if 
0039:  5@ ==  1 
004D: jump_if_false @Menu_06
0247: load_model #INFERNUS

while 8248:  not model  #INFERNUS available
0001: wait  0 ms
end

00A5: 0@ = create_car #INFERNUS  at 1@ 2@ 3@
0249: release_model #INFERNUS
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0002: jump @Remove_Menu

:Menu_06
00D6: if 
0039:  5@ ==  2 
004D: jump_if_false @Menu_07
0247: load_model #BULLET

while 8248:  not model  #BULLET available
0001: wait  0 ms
end

00A5: 0@ = create_car #BULLET  at 1@ 2@ 3@
0249: release_model #BULLET
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0002: jump @Remove_Menu

:Menu_07
00D6: if 
0039:  5@ ==  3 
004D: jump_if_false @Menu_08
0247: load_model #TURISMO

while 8248:  not model  #TURISMO available
0001: wait  0 ms
end

00A5: 0@ = create_car #TURISMO  at 1@ 2@ 3@
0249: release_model #TURISMO
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0002: jump @Remove_Menu

:Menu_08
00D6: if 
0039:  5@ ==  4 
004D: jump_if_false @Menu_09
0247: load_model  #CHEETAH

while 8248:  not model  #CHEETAH available
0001: wait  0 ms
end

00A5: 0@ = create_car #CHEETAH  at 1@ 2@ 3@
0249: release_model #CHEETAH
01C3: remove_references_to_car 0@ // Like turning a car into any random car
0002: jump @Remove_Menu

:Menu_09
00D6: if 
0039:  5@ ==  5 
004D: jump_if_false @Remove_Menu
0247: load_model  #SULTAN

while 8248:  not model #SULTAN available
0001: wait  0 ms
end

00A5: 0@ = create_car #SULTAN  at 1@ 2@ 3@
0249: release_model #SULTAN
01C3: remove_references_to_car 0@ // Like turning a car into any random car

:Remove_Menu
03E6: remove_text_box
01B4: set_player $PLAYER_CHAR can_move 1
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
08DA: remove_panel 4@
0826: enable_hud 1
03F0: enable_text_draw 0
0002: jump @Menu_01

The menus data entry's must be what an entry of a text, in GXT or a *.fxt file. If there is no entry, found with that name, then no texts in the menu will appear. Put DUMMY if the data column is unused ^ <see above>


So basically, if you wanna add other to that menu, for example, after the last menu entry(SULTAN replace DUMMY after that with you're text entry, then go down to:

Code:

00D6: if 
0039:  5@ ==  5 
004D: jump_if_false @Remove_Menu

Change @Remove_Menu with you're next(for example @Menu_10).
So it goes on to the text menu entry.

After the last entry add this for example:

Code:

:Menu_10 // same as
00D6: if 
0039:  5@ ==  6 
004D: jump_if_false @Remove_Menu
0247: load_model  <model>

while 8248:  not model <model> available
0001: wait  0 ms
end

00A5: 0@ = create_car <model>  at 1@ 2@ 3@
0249: release_model <model>
01C3: remove_references_to_car 0@ // Like turning a car into any random car

Replace <model> with the model name/ID.

http://gtamodding.com

Back to top  Message [Page 1 of 1]

Similar topics

-

» Creating a Thread

Permissions in this forum:
You cannot reply to topics in this forum