Difference between revisions of "0AAC"
Jump to navigation
Jump to search
NTAuthority (talk | contribs) m (cleo3) |
|||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
{{OpCode | {{OpCode | ||
| ini = 0AAC=2,%2d% %1d% | | ini = 0AAC=2,%2d% %1d% | ||
Line 4: | Line 5: | ||
| p1 = Variable to store the mp3 handle | | p1 = Variable to store the mp3 handle | ||
− | | game = [[San Andreas]] | + | | game = [[San Andreas]] with [[CLEO]] |
}} | }} | ||
− | |||
This opcode loads an MP3 file from the given path. It is used in conjunction with opcodes [[0AAB]] and [[0AAD]] | This opcode loads an MP3 file from the given path. It is used in conjunction with opcodes [[0AAB]] and [[0AAD]] | ||
− | [[Sanny Builder]] example:<source lang="scm">0AAC: 0@ = load_mp3 "CLEO\playlist\01.mp3" | + | [[Sanny Builder]] example:<source lang="scm">0AAC: 0@ = load_mp3 "CLEO\playlist\01.mp3"</source> |
− | </source> | ||
− | == | + | ==Example== |
− | + | This is an example code and should not be copied verbatim. The following codes is for San Andreas using Sanny Builder's format. | |
<source lang="scm"> | <source lang="scm"> | ||
− | : | + | {$CLEO .cs} |
− | wait 0 ms | + | |
− | + | 0000: NOP | |
− | + | while true | |
− | + | wait 0 ms | |
− | if and | + | if and |
− | + | 0AB0: key_pressed 77 // M | |
− | 0AAB: | + | 0AAB: file_exists "CLEO\PLAYLIST\01.MP3" |
− | then | + | then |
− | + | 0AAC: 0@ = load_mp3 "CLEO\PLAYLIST\01.MP3" | |
− | + | wait 1000 ms | |
− | + | 0AAD: set_mp3 0@ perform_action 1 | |
+ | 0A93: end_custom_thread | ||
+ | end | ||
end | end | ||
− | |||
− | |||
− | |||
− | |||
− | |||
</source> | </source> | ||
Revision as of 16:14, 22 June 2010
{{{games}}}
- Description
- Loads an MP3 file from given path
- Syntax
- {{{syntax1}}}
- Parameter
This opcode loads an MP3 file from the given path. It is used in conjunction with opcodes 0AAB and 0AAD
Sanny Builder example:
0AAC: 0@ = load_mp3 "CLEO\playlist\01.mp3"
Example
This is an example code and should not be copied verbatim. The following codes is for San Andreas using Sanny Builder's format.
{$CLEO .cs}
0000: NOP
while true
wait 0 ms
if and
0AB0: key_pressed 77 // M
0AAB: file_exists "CLEO\PLAYLIST\01.MP3"
then
0AAC: 0@ = load_mp3 "CLEO\PLAYLIST\01.MP3"
wait 1000 ms
0AAD: set_mp3 0@ perform_action 1
0A93: end_custom_thread
end
end
Keywords
load, mp3, audio, sound
See also
- MP3 Player - a CLEO plugin written by Seemann
- GTAForums: jPlayer mod
Notes
The MP3 opcodes have been known to cause crashes in CLEO3 on some occasions. Take care when using these opcodes.