Dominopi Posted November 30, 2014 Report Share Posted November 30, 2014 Hello, I have a problem with server. When I change skin, some items from toolbelt disappear. Used scirpts: DGZM, DZAI, DZMS, Gold/coins, Take clothes , Do you have solution? best regards, dominik Link to comment Share on other sites More sharing options...
0 Gr8 Posted November 30, 2014 Report Share Posted November 30, 2014 if (player hasWeapon "ItemCompass") then { _hasCompass = true; }; if (player hasWeapon "ItemRadio") then { _hasRadio = true; }; if (player hasWeapon "ItemGPS") then { _hasGPS = true; }; if (player hasWeapon "ItemWatch") then { _hasWatch = true; }; if (player hasWeapon "ItemMap") then { _hasMap = true; }; Put that at the top of player_wearClothes.sqf and put this at the bottom if (!_hasCompass) then { player addWeapon "ItemCompass"; }; if (!_hasRadio) then { player addWeapon "ItemRadio"; }; if (!_hasGPS) then { player addWeapon "ItemGPS"; }; if (!_hasWatch) then { player addWeapon "ItemWatch"; }; if (!_hasMap) then { player addWeapon "ItemMap"; }; Link to comment Share on other sites More sharing options...
0 Dominopi Posted December 1, 2014 Author Report Share Posted December 1, 2014 hey, like this? /* _item spawn player_wearClothes; Added Female skin changes - DayZ Epoch - vbawol */ private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model","_playerNear"]; if (player hasWeapon "ItemCompass") then { _hasCompass = true; }; if (player hasWeapon "ItemRadio") then { _hasRadio = true; }; if (player hasWeapon "ItemGPS") then { _hasGPS = true; }; if (player hasWeapon "ItemWatch") then { _hasWatch = true; }; if (player hasWeapon "ItemMap") then { _hasMap = true; }; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_83") , "PLAIN DOWN"] }; DZE_ActionInProgress = true; _item = _this; call gear_ui_init; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_player_21") , "PLAIN DOWN"]}; _hasclothesitem = _this in magazines player; _config = configFile >> "CfgMagazines"; _text = getText (_config >> _item >> "displayName"); if (!_hasclothesitem) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]}; if (vehicle player != player) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_85"), "PLAIN DOWN"]}; //if (!isNull (unitBackpack player)) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_9"), "PLAIN DOWN"] }; if ("CSGAS" in (magazines player)) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_10"), "PLAIN DOWN"] }; _myModel = (typeOf player); _itemNew = "Skin_" + _myModel; //diag_log ("Debug Clothes: model In: " + str(_itemNew) + " Out: " + str(_item)); if ( (isClass(_config >> _itemNew)) ) then { if ( (isClass(_config >> _item)) ) then { // Current sex of player skin _currentSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex"); // Sex of new skin _newSex = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex"); //diag_log ("Debug Clothes: sex In: " + str(_currentSex) + " Out: " + str(_newSex)); if(_currentSex == _newSex) then { // Get model name from config _model = getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel"); if (_model != _myModel) then { if(([player,_item] call BIS_fnc_invRemove) == 1) then { player addMagazine _itemNew; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; }; } else { cutText [(localize "str_epoch_player_86"), "PLAIN DOWN"]; }; }; }; DZE_ActionInProgress = false; if (!_hasCompass) then { player addWeapon "ItemCompass"; }; if (!_hasRadio) then { player addWeapon "ItemRadio"; }; if (!_hasGPS) then { player addWeapon "ItemGPS"; }; if (!_hasWatch) then { player addWeapon "ItemWatch"; }; if (!_hasMap) then { player addWeapon "ItemMap"; }; Link to comment Share on other sites More sharing options...
0 ElDubya Posted December 1, 2014 Report Share Posted December 1, 2014 Does this also fix Zupa's Overwatch clothing script duping toolbelt items? Link to comment Share on other sites More sharing options...
0 Dominopi Posted December 2, 2014 Author Report Share Posted December 2, 2014 Does this also fix Zupa's Overwatch clothing script duping toolbelt items? I installed Zupa clothing and it does not fixed it. Maybe Gr8boi, can help. Link to comment Share on other sites More sharing options...
0 Gr8 Posted December 3, 2014 Report Share Posted December 3, 2014 Yes, Your File seems fine, This also works in zupa's Clothing Link to comment Share on other sites More sharing options...
Question
Dominopi
Hello, I have a problem with server. When I change skin, some items from toolbelt disappear.
Used scirpts:
DGZM,
DZAI,
DZMS,
Gold/coins,
Take clothes ,
Do you have solution?
best regards, dominik
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now