2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* 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"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
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);
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Buds already in and removing them.
|
2015-01-13 04:17:52 +00:00
|
|
|
_player addItem "ACE_EarBuds";
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-13 04:17:52 +00:00
|
|
|
_player setVariable ["ACE_hasEarPlugsIn", false, true];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-13 04:17:52 +00:00
|
|
|
[localize "STR_ACE_Hearing_Earbuds_Are_Off"] call EFUNC(common,displayTextStructured);
|