Jump to content
  • 0

Heatpacks


DaveA

Question

Heatpacks aren't working atm on my server. So far I haven't had any luck finding where in the code the call for using them is. 

So far I've looked thru most of the mission files fn_selfactions, variables, compiles. The server files like server_monitor, server_functions. The arma 2oa files which is where I thought I would find them especially under dayz_code.pbo or dayz_epoch.pbo I haven't gound anything there listing the "itemheatpack". In the dayz_code.pbo there is even a folder for medical but heat pack isn't listed.

I am not sure if I am lam looking for heatpacks in all the wrong places or whether I am looking for the wrong name. Any help would be appreciated. Thanks

(edit) Also i tried looking thru the files on the github and don't see heatpacks there tho I believe they were a part of the original dayz so them may just be using that code.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Ok I finally found where it was hiding in dayz_code.pbo under actions then player_usemeds.sqf

 

private ["_item","_id","_onLadder","_hasmeditem","_config","_text"];
_item = _this;
call gear_ui_init;
_onLadder =        (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};

_hasmeditem = _this in magazines player;

_config = configFile >> "CfgMagazines" >> _item;
_text = getText (_config >> "displayName");

if (!_hasmeditem) exitWith {cutText [format[(localize "str_player_31"),_text,"use"] , "PLAIN DOWN"]};
switch (_item) do {
    case "ItemBandage": {
        _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\bandage.sqf";
    };
    case "ItemMorphine": {
        _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\morphine.sqf";
    };
    case "ItemPainkiller": {
        _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\painkiller.sqf";
    };
    case "ItemAntibiotic": {
        _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\antibiotics.sqf";
    };
    case "ItemBloodbag": {
        _id = [0,0,0,[player]] execVM "\z\addons\dayz_code\medical\self_transfusion.sqf";
    };
    case "ItemHeatPack": {
        player removeMagazine "ItemHeatPack";
        dayz_temperatur = (dayz_temperatur + 5) min dayz_temperaturmax;
        cutText [localize "str_player_27", "PLAIN DOWN"];
    };
};

 

Link to comment
Share on other sites

  • 0

I Have no idea on how you managed to break heatpacks as they are working by default.

Maybe you installed some right click action script and Messed it up? Or maybe you got a custom GUI and the Temperature is simply not displayed correctly? Also validate your game files with steam.

 

 

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...