Jump to content

fetching sound title


botshara

Recommended Posts

local streams = { } 
streams[1] = {"http://relay.181.fm:8008", "181.1 - Rock 181 FM"} 
streams[2] = {"http://relay.181.fm:8068","181.2 - Old School 181 FM"} 
function showStation(source) 
    local theVehicle = getPedOccupiedVehicle(getLocalPlayer()) 
    local meta = getSoundMetaTags(source)    
    if (theVehicle) then 
        local streamID = getElementData(theVehicle, "vehicle:radio") 
        local streamTitle 
        if tonumber(streamID) ~= 0 then 
            streamTitle = streams[tonumber(streamID)][2] 
        else 
            streamTitle = "Radio Off" 
        end 
  
        outputChatBox(streamTitle .."Song: "..(meta.title)) 
    end 
end 

didnt show song title

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...