mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
29 lines
590 B
Plaintext
29 lines
590 B
Plaintext
/*
|
|
* Author: Hope Johnson
|
|
* Edited by commy2
|
|
*
|
|
* Puts in / takes out earplugs.
|
|
*
|
|
* Arguments:
|
|
* none
|
|
*
|
|
* Return Value:
|
|
* none
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
private "_player";
|
|
|
|
_player = _this select 0;
|
|
|
|
if !(_player canAdd "ACE_EarBuds") exitWith { // inventory full
|
|
[localize "STR_ACE_Hearing_Inventory_Full"] call EFUNC(common,displayTextStructured);
|
|
};
|
|
|
|
// Buds already in and removing them.
|
|
_player addItem "ACE_EarBuds";
|
|
|
|
_player setVariable ["ACE_hasEarPlugsIn", false, true];
|
|
|
|
[localize "STR_ACE_Hearing_Earbuds_Are_Off"] call EFUNC(common,displayTextStructured);
|