Jump to content

help !


Paplo

Recommended Posts

client 
  
function makeRadioStayOff() 
    setRadioChannel(0) 
    cancelEvent() 
end 
  
  
addEventHandler ( "onClientGUIClick", guiRoot, 
    function ( ) 
        if ( source == GUIEditor.staticimage[2] ) then 
        end 
            if ( source == GUIEditor.staticimage[2] ) then 
                if not songOff then 
        setSoundVolume(song,0) 
        songOff = true 
        removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
    else 
        setSoundVolume(song,1) 
        songOff = false 
        setRadioChannel(0) 
        addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) 
  
        end 
    end 
end 
) 

not working

what problem?

Link to comment
-- client 
  
songOff = false 
  
function makeRadioStayOff( ) 
    setRadioChannel( 0 ) 
    cancelEvent( ) 
end 
  
  
addEventHandler( "onClientGUIClick", guiRoot, 
    function( ) 
        if source == GUIEditor.staticimage[2] then 
            if not songOff then 
                setSoundVolume( song, 0 ) 
                removeEventHandler( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) 
        else 
            setSoundVolume( song, 1 ) 
            setRadioChannel( 0 ) 
            addEventHandler( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) 
        end 
        songOff = not songOff 
    end 
end 
) 

Link to comment
-- client 
  
songOff = false 
  
function makeRadioStayOff( ) 
    setRadioChannel( 0 ) 
    cancelEvent( ) 
end 
  
  
addEventHandler( "onClientGUIClick", guiRoot, 
    function( ) 
        if source == GUIEditor.staticimage[2] then 
            if not songOff then 
                setSoundVolume( song, 0 ) 
                removeEventHandler( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) 
        else 
            setSoundVolume( song, 1 ) 
            setRadioChannel( 0 ) 
            addEventHandler( "onClientPlayerRadioSwitch", root, makeRadioStayOff ) 
        end 
        songOff = not songOff 
    end 
end 
) 

client.lua:543: Bad 'sound/player'pointer @ 'setSoundVolume'(1)

line 543 : setSoundVolume( song, 0 )

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