Jump to content

Help with GUI Radio


xXMADEXx

Recommended Posts

Hey guys, im making a GUI radio system, and i cannot get this script to work. I tried to edit the script, from another script i have, but cannot get it, any advice?

 radios = { {"Hot 108 Jamz","http://scfire-dtc-aa01.stream.aol.com:80/stream/1038"} } 
function use2() 
    local row, col = guiGridListGetSelectedItem(rog_ucp_radio_grid)   
    if (row and col and row ~= -1 and col ~= -1) then 
        local model = tonumber(guiGridListGetItemData(rog_ucp_radio_grid, row, 1)) 
        if model ~= "" then 
            playSound(row, col) 
        end 
    end 
end 
addEventHandler("onClientGUIClick", rog_ucp_radio_button_stream, use2, false) 

Link to comment

So, that would be item data, try this:

radios = { {"Hot 108 Jamz","http://scfire-dtc-aa01.stream.aol.com:80/stream/1038"} } 
  
function use2 ( ) 
    local row, col = guiGridListGetSelectedItem ( rog_ucp_radio_grid)    
    if ( row and col and row ~= -1 and col ~= -1 ) then 
        local url = guiGridListGetItemData ( rog_ucp_radio_grid, row, 1 ) 
        if ( url ~= "" ) then 
            playSound ( url ) 
        end 
    end 
end 
addEventHandler ( "onClientGUIClick", rog_ucp_radio_button_stream, use2, false ) 

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