Jump to content

getSoundMetaTags


Mr.Saitama

Recommended Posts

Hello guys, i have an problem at my script, code: 

addCommandHandler("faka",
    function() 
        for i,v in ipairs(getElementsByType("sound")) do 
        	local meta = getSoundMetaTags(v)

			if not meta or not meta.artist and not meta.title then
				outputChatBox("song: no info")
			else
				outputChatBox(meta.artist.. " - " ..meta.title.. "")
			end
        end 
    end 
) 

the script does not show Race/DM Maps music name.. just the "song: no info". Can you guys help me?

Thanks.

Link to comment
  • Administrators

Probably because the song doesn't have any of the data? If you go to the mp3 file itself and right click > properties > details, does it have title / artist data?

@koragg should work for any sound element, whether it be a stream or local file.

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...