Paplo Posted June 19, 2013 Share Posted June 19, 2013 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
PaiN^ Posted June 19, 2013 Share Posted June 19, 2013 -- 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
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 -- 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
PaiN^ Posted June 19, 2013 Share Posted June 19, 2013 Is song defined any where in the script ? Link to comment
Paplo Posted June 19, 2013 Author Share Posted June 19, 2013 Is song defined any where in the script ? ty I've been wrong in the name of song is sound not song thanks any way Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now