Sld. Alexx Alvarez 0 Posted September 5, 2020 I want to make a radio for base, that you will can turn on and turn off... I utilice this script: SPK_Radio = Radio_0; SPK_fnc_PonerRadio = { _heli = "cwa_HeliHEmpty" createVehicle getMarkerPos "h2spawn"; _heli say3D ["Music1", 60, 1]; }; SPK_fnc_QuitarRadio = { deleteVehicle _heli}; SPK_Radio addAction ["<t color='#00FF00'>Radio ON", {[]call SPK_fnc_PonerRadio;}]; SPK_Radio addAction ["<t color='##FF0000'>Radio OFF", {[] call SPK_fnc_QuitarRadio;}]; The radio turn on perferct, but when I turn off the radio, it don't work... 😕 Error: Variable not defined ---> I don't know how solution the problem HELP ME!! Share this post Link to post Share on other sites
Casio91Fin 31 Posted September 5, 2020 maybe this could be helpfulhttps://www.youtube.com/watch?v=ZWCfHXS898I&t=193s Share this post Link to post Share on other sites
Sld. Alexx Alvarez 0 Posted September 5, 2020 I have it, I can play music but the problem is when I want to stop it... 😕 I try it: SPK_fnc_QuitarRadio = { deleteVehicle _heli}; Share this post Link to post Share on other sites
Von Quest 1163 Posted September 7, 2020 _heli is not defined in the 2nd Function (you're using a local variable). Just change them all to a global variable (drop the _ and use just heli). .......but it still might continue to play as I believe it's just using the Location of that Object as reference point to start the sound at. 1 Share this post Link to post Share on other sites