ACE3/addons/hearing/functions/fnc_removeEarplugs.sqf

29 lines
590 B
Plaintext
Raw Normal View History

/*
* Author: Hope Johnson
* Edited by commy2
*
* Puts in / takes out earplugs.
*
* Arguments:
* none
*
* Return Value:
* none
*/
2015-01-14 01:41:53 +00:00
#include "script_component.hpp"
private "_player";
_player = _this select 0;
2015-01-13 04:17:52 +00:00
if !(_player canAdd "ACE_EarBuds") exitWith { // inventory full
[localize "STR_ACE_Hearing_Inventory_Full"] call EFUNC(common,displayTextStructured);
};
// Buds already in and removing them.
2015-01-13 04:17:52 +00:00
_player addItem "ACE_EarBuds";
2015-01-13 04:17:52 +00:00
_player setVariable ["ACE_hasEarPlugsIn", false, true];
2015-01-13 04:17:52 +00:00
[localize "STR_ACE_Hearing_Earbuds_Are_Off"] call EFUNC(common,displayTextStructured);