Difference between revisions of "0AAC"

From GTAMods Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
| p1          = Variable to store the mp3 handle
 
| p1          = Variable to store the mp3 handle
  
| game        = San Andreas
+
| game        = [[San Andreas]]
 
}}
 
}}
 
+
__NOTOC__
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: $hMP3 = load_mp3 "CLEO\playlist\01.mp3"
 
[[Sanny Builder]] example:<source lang="scm">0AAC: $hMP3 = load_mp3 "CLEO\playlist\01.mp3"
 
</source>
 
</source>
 
==Notes==
 
The MP3 opcodes have been known to cause crashes on some occasions. Take care when using these opcodes.
 
  
 
==Examples==
 
==Examples==
Line 37: Line 34:
 
</source>
 
</source>
  
A MP3 [[ CLEO ]] plugin written by Seemann available at [http://cleo.sannybuilder.com]
+
==Keywords==
 +
load, mp3
  
jPlayer mod: [http://www.gtaforums.com/index.php?showtopic=399466]
+
==See also==
+
* MP3 Player - a [[CLEO#Plugins|CLEO plugin]] written by {{U|Seemann}}
 +
* {{GTAF|399466|jPlayer mod}}
  
==Keywords==
+
==Notes==
load, mp3
+
The MP3 opcodes have been known to cause crashes on some occasions. Take care when using these opcodes.
  
[[Category:Mission Scripting]]
+
[[Category:CLEO Opcodes]]

Revision as of 21:20, 5 April 2009

{{{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: $hMP3 = load_mp3 "CLEO\playlist\01.mp3"

Examples

The following code is only an example and has not been tested nor is it complete, thus meaning it should not be copied and compiled.

:START
wait 0 ms
if
    Player.Defined($PLAYER_CHAR)
jf @START
if and
    0AB0: key_pressed 77 //M
        0AAB:  file_exists "CLEO\playlist\01.mp3"
then
    0AAC: $hMP3 = load_mp3 "CLEO\playlist\01.mp3"
else
    jump @START
end

:SECOND
wait 1000 ms
0AAD: set_mp3 $hMP3 perform_action 1
0A93: end_custom_thread

Keywords

load, mp3

See also

Notes

The MP3 opcodes have been known to cause crashes on some occasions. Take care when using these opcodes.