From f9c5f70799f51108201663a1b3ff464cf77816a4 Mon Sep 17 00:00:00 2001 From: worldwidesorrow Date: Wed, 29 Jul 2020 15:24:57 -0500 Subject: [PATCH] Add files via upload --- SQF/dayz_code/actions/radioState.sqf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 SQF/dayz_code/actions/radioState.sqf diff --git a/SQF/dayz_code/actions/radioState.sqf b/SQF/dayz_code/actions/radioState.sqf new file mode 100644 index 000000000..52bda4ff8 --- /dev/null +++ b/SQF/dayz_code/actions/radioState.sqf @@ -0,0 +1,11 @@ +// This function simulates turning "ItemRadio" on and off to accept or deny local messaging of type "radio". + +if(player getVariable["radiostate",true]) then { + localize "str_actions_radio_off" call dayz_rollingMessages; + player setVariable["radiostate",false]; + playSound "Switch_On_Off"; +} else { + localize "str_actions_radio_on" call dayz_rollingMessages; + player setVariable["radiostate",true]; + playSound "Switch_On_Off"; +}; \ No newline at end of file