private ["_skin","_removeSkin","_choice"];
_skin = _this select 0;
_removeSkin = _this select 1;
_choice = _this select 2;
_humanity = player getVariable["humanity",0];
_model = typeOf player;
_AddSkin = "Skin_Survivor2_DZ"; // default
if((_model != "SurvivorW2_DZ") && (_model != "BanditW1_DZ")) then{
// added model check to give correct parcels when changing between skins
if(_model in ["Sniper1_DZ","GUE_Soldier_Sniper","Ins_Soldier_Sniper"]) then{
_AddSkin = "Skin_Sniper1_DZ";
};
if(_model in ["Camo1_DZ","GUE_Soldier_CO","FR_GL"]) then{
_AddSkin = "Skin_Camo1_DZ";
};
if(_model in ["Soldier1_DZ","GUE_Commander","TK_Soldier_EP1"]) then{
_AddSkin = "Skin_Soldier1_DZ";
};
if (_skin == "camoh") then {
if(_humanity >= 5000) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to gain %2 more.",_humanity,(5000 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "camob") then {
if(_humanity <= -2500) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to lose %2 .",_humanity,(-2500 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "soldierh") then {
if(_humanity >= 5000) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to gain %2 more.",_humanity,(5000 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "soldierb") then {
if(_humanity <= -2500) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to lose %2 .",_humanity,(-2500 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "sniperh") then {
if(_humanity >= 5000) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to gain %2 more.",_humanity,(5000 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "sniperb") then {
if(_humanity <= -2500) then{
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
} else {
closeDialog 0;
cutText [format["You do not have the required humanity. Your humanity is %1, you need to lose %2 .",_humanity,(-2500 - _humanity)], "PLAIN DOWN"];
};
};
if (_skin == "normal") then {
player removeMagazine _removeSkin;
player addMagazine _AddSkin;
uisleep 0.5;
[dayz_playerUID,dayz_characterID,_choice] spawn player_humanityMorph;
player removeWeapon "ItemRadio";
};
}else{
cutText ["Female models do not support these skins.", "PLAIN DOWN"];
};