Reacer Posted May 6, 2012 Share Posted May 6, 2012 Hi all, I' just got an radioplayer for my server. It's an DM server and we have alot maps with music integrated which you can turn off by pressing M. But now my question is, I want to make a script to turn the mapmusic automatic off when the client is listening to the radio channel. Can someone help me with this ? Thanks Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 onClientPlayerRadioSwitch getRadioChannel Link to comment
Reacer Posted May 6, 2012 Author Share Posted May 6, 2012 It is not an official mta radio channel it is gui window with internet music stations Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 Create own event then and get this chunk from the function that uses bind 'm', and create new function that will stop when the music from the GUI radio is turned on Link to comment
Reacer Posted May 6, 2012 Author Share Posted May 6, 2012 Hmm, yea i understand how to turn the music off every map automaticly, but how can i make it in the script that it only turns of with gui radio on, the gui window is binded to f2 Link to comment
Reacer Posted May 6, 2012 Author Share Posted May 6, 2012 I mean, how can I get the information if gui radio is on? Link to comment
hxv Posted May 6, 2012 Share Posted May 6, 2012 You can make variable local turnedOn = false function toggleRadioGUI() if turnedOn == false then turnedOn = true -- here radio is running else turnedOn = false -- here radio is turned off end end then just put condition : if turnedOn == false then .... and something like that 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