bigjfdjew

Untitled

Feb 29th, 2020
104
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private ["_item","_onLadder","_hasmeditem","_config","_text","_display"];
  2.  
  3. _item = _this;
  4. call gear_ui_init;
  5. closeDialog 0;
  6. _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
  7. if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages;};
  8.  
  9. _hasmeditem = _item in magazines player;
  10.  
  11. _config = configFile >> "CfgMagazines" >> _item;
  12. _text = getText (_config >> "displayName");
  13.  
  14. if (!_hasmeditem) exitWith {format[localize "str_player_31",_text,localize "str_player_31_use"] call dayz_rollingMessages;};
  15.  
  16. switch (_item) do {
  17. case "ItemBandage": {
  18. _id = [0,0,0,[player,"ItemBandage"]] execVM "\z\addons\dayz_code\medical\bandage.sqf";
  19. };
  20. case "ItemMorphine": {
  21. _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\morphine.sqf";
  22. };
  23. case "ItemPainkiller": {
  24. _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\painkiller.sqf";
  25. };
  26. };
  27. if (vehicle player != player) then {
  28. _display = findDisplay 106;
  29. _display closeDisplay 0;
  30. };
RAW Paste Data