Difference between revisions of "GetSoundMetaTags"

From Multi Theft Auto: Wiki
Line 31: Line 31:

Revision as of 18:28, 10 December 2018

Used to get the meta tags attached to a sound. These provide information about the sound, for instance the title or the artist.


table getSoundMetaTags ( element sound [, string format = "" ] )

OOP Syntax Help! I don't understand this!

Method: sound:getMetaTags(...)

Required Arguments

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • format: a filter string to get a specific meta tag.


Returns a table, but only a string if format is given, with all data available (keys are listed below) for the sound if successful, false otherwise.

  • title
  • artist
  • album
  • genre
  • year
  • comment
  • track
  • composer
  • copyright
  • subtitle
  • album_artist
  • stream_name
  • stream_title


	local meta = getSoundMetaTags(source)
	outputChatBox("The sound: "..(meta.title).." has finished in :"..length.."ms.")
        outputChatBox("The sound meta tags: Artist:"..(meta.artist).." Album:"..(meta.album).." Genre:"..(meta.genre).." Year:"..(meta.year).." Comment:"..(meta.comment).." Track:"..(meta.track).." Composer:"..(meta.composer).." Copyright:"..(meta.copyright).." SubTitle:"..(meta.subtitle).." Album Artist:"..(meta.album_artist)..".")

See Also