Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FUNCTIONS
- //When player equips hearing protection
- wearer_fadeSound = {2 fadeSound 0.25}; //Sound fades out smoothly
- wearer_addSound = {2 fadeSound 1}; //Sound fades in smoothly
- //Detect Rangemaster Cap or Opscore Fast with Active Hearing
- //Wearing
- hearISProt_true =
- {
- if ((items player) find "lyn_earplugs" >= 0)
- then {_this call wearer_fadeSound};
- };
- //Not Wearing
- hearISProt_false =
- {
- if ((items player) find "lyn_earplugs" <= 0)
- then {_this call wearer_addSound};
- };
- //Do checking
- checkHearProt =
- {
- _this call hearISProt_true;
- _this call hearISProt_false;
- };
- while {alive player} do {sleep 0.5; _this call checkHearProt};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement