Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- MP3 player Addon Main.scm for Shinobi World
- https://www.youtube.com/watch?v=VnYEf9gFDGY
- by J16D
- path mp3 files; GTA SA\Addon_NM\ambient_sounds
- mp3 files Names; MAX 10 char
- HOME - Play/Next
- END - Stop
- }
- :AUDIO_BACK_MP3
- thread "AUDIO_BACK_MP3"
- wait $DEFAULT_WAIT_TIME
- :activated
- while true
- if
- Player.Defined($PLAYER_CHAR)
- then
- repeat
- wait 0
- until 816B: not fading
- if and
- $ONMISSION == 0
- 0AB0: key_pressed 36 /// home
- then
- 0A99: chdir "Addon_NM\ambient_sounds"
- ///0AC8: 15@ = allocate_memory_size 260
- while true
- if
- 0AE6: 0@ = find_first_file "*.mp3" get_filename_to 15@v // IF and SET
- then
- :check_state
- 0AAC: 10@ = load_audiostream 15@v
- 0AAD: set_mp3 10@ perform_action 1
- 0ABC: set_audiostream 10@ volume 0.2
- {
- 0ADF: add_dynamic_GXT_entry "S_AMBI" text 15@v
- 0512: show_permanent_text_box 'S_AMBI'
- }
- while true
- 0AB9: get_mp3 10@ state_to 7@
- if
- not Player.Defined($PLAYER_CHAR)
- then
- break
- end
- if or
- 0039: 7@ == -1
- 0AB0: key_pressed 36 /// home
- then
- if
- 0AE7: 15@v = find_next_file 0@ // IF and SET
- then
- 0AAD: set_mp3 10@ perform_action 0
- 0AAE: release_mp3 10@
- {
- 03E6: remove_text_box
- 0AE0: remove_dynamic_GXT_entry "S_AMBI"
- }
- wait 50
- jump @check_state
- else
- if
- 8AE7: not 15@v = find_next_file 0@ // IF and SET
- then
- 0AE8: find_close 0@
- break
- end
- end
- end
- if or
- $ONMISSION == 1
- 0AB0: key_pressed 35 /// end
- then
- jump @temporaly_desactivated
- end
- wait 0
- end
- 0AAD: set_mp3 10@ perform_action 0
- 0AAE: release_mp3 10@
- {
- 03E6: remove_text_box
- 0AE0: remove_dynamic_GXT_entry "S_AMBI"
- }
- end
- wait 250
- end
- end
- end
- wait 0
- end
- 004E: end_thread
- :temporaly_desactivated
- 0A99: chdir 0
- ///0AC9: free_allocated_memory 15@
- 0AAD: set_mp3 10@ perform_action 0
- 0AAE: release_mp3 10@
- {
- 03E6: remove_text_box
- 0AE0: remove_dynamic_GXT_entry "S_AMBI"
- }
- wait 1000
- jump @activated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement