Files
DayZ-Epoch/SQF/dayz_code/actions/player_fixBottle.sqf
2016-03-05 22:34:25 -05:00

21 lines
619 B
Plaintext

private ["_bottle","_tape","_fixedBottle"];
_bottle = _this;
_tape = "equip_duct_tape";
_fixedBottle = "ItemWaterBottleUnfilled";
call gear_ui_init;
closeDialog 0;
// Check if the player has the tape
if (_tape in magazines player) then {
//Fix the bottle
player playActionNow "Medic";
[player,"bandage",0,false] call dayz_zombieSpeak;
uiSleep 6;
player removeMagazine _bottle;
player removeMagazine _tape;
player addMagazine _fixedBottle;
cutText [localize "str_fix_water_bottle", "PLAIN DOWN"];
} else { //If the player doesn't have the tape
cutText [localize "str_fix_water_bottle_fail", "PLAIN DOWN"];
};