Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- $text : array 10 of int
- $element : int
- end
- const
- MAX_ELEMENTS = 3
- end
- :Create3DMenu
- /*
- use: 0AB1: @Create3DMenu 1 activ_element 0
- */
- 0AB1: @ActorFreeze 1 true
- 04C4: store_coords_to 4@ 5@ 6@ from_actor $player_actor with_offset -0.7 -0.7 0.0
- Camera.Restore_WithJumpCut()
- 068D: get_camera_position_to 7@ 8@ 6@
- for 1@ = 1 to MAX_ELEMENTS step 1
- 0085: 2@ = 1@
- 2@ *= 0x19
- 0AC6: 3@ = label @Text3DMenu offset
- 005A: 3@ += 2@
- 6@ -= 0.07
- if 003B: 1@ == 0@
- then 0B44: samp $text[1@] = create_3d_text 3@ color 0xFFFFC425 position 4@ 5@ 6@ view_distance 50.0 show_behind_walls true attached_to_player -1 attached_to_vehicle -1
- else 0B44: samp $text[1@] = create_3d_text 3@ color 0xFFFFFFFF position 4@ 5@ 6@ view_distance 50.0 show_behind_walls true attached_to_player -1 attached_to_vehicle -1
- end
- end
- 0AB2: ret 0
- :Destroy3DMenu
- /*
- use 0AB1: @Destroy3DMenu 0
- */
- for 0@ = 1 to MAX_ELEMENTS step 1
- if 0B46: samp 3d_text $text[0@] defined
- jf continue
- 0B45: samp destroy_3d_text $text[0@]
- end
- 0AB1: @ActorFreeze 1 false
- 0AB2: ret 0
- :IsClosed3DMenu
- /*
- use: 0AB1: @IsClosed3DMenu 0 return: closed_element 0@
- */
- if or
- 0AB0: 0x57
- 0AB0: 0x26
- then
- 0@ = 1
- if $element == 1
- then $element = MAX_ELEMENTS
- else $element --
- end
- end
- if or
- 0AB0: 0x53
- 0AB0: 0x28
- then
- 0@ = 1
- if $element == MAX_ELEMENTS
- then $element = 1
- else $element ++
- end
- end
- if 0@ == 1
- then
- 0AB1: @Destroy3DMenu 0
- 0AB1: @Create3DMenu 1 activ_element $element
- wait 100
- end
- if 0AB0: 0xD // enter
- then 0AB1: @Destroy3DMenu 0
- end
- 0AB2: ret 1 $element
- :ActorFreeze
- 0A96: 1@ = actor $player_actor struct
- 1@ += 0x598
- 0A8C: write_memory 1@ size 1 value 0@ virtual_protect 0
- Actor.LockInCurrentPosition($PLAYER_ACTOR, 0@)
- 0AB2: ret 0
- :Text3DMenu
- // Default size 25 byte
- hex
- {0} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // Íå èñïîëüçîâàòü!
- {1} "Element1" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- {2} "Element2" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- {3} "Exit" 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement