Humanity Perks?

I'm about to test it all out now, got 2 additional skin choices for each parcel type and 3 new survivor skins for the survivor parcel. All the other parcels have a humanity check on use, and changing back to the survivor skin should give back the correct parcel in regards to the new skins hopefully.
 
Tested this out on my test server and it did not seem to work. I'm wondering if it is due to have a lot of the dayz_code configuration files mission side. I have all the skin configs and their actions etc in the mission file that are called. They might not be getting used by some of the changes I've made to the server so I might try removing them to test if that's what's interfering.
 
Can't seem to get this to work after tinkering with it for a while, it seems like it doesn't want to add any options to items that already have options.
 
Can't seem to get this to work after tinkering with it for a while, it seems like it doesn't want to add any options to items that already have options.
Do you actually have the extraRC file added in your player_selectSlot?
 
Do you actually have the extraRC file added in your player_selectSlot?
I have "#include "dayz_code\Configs\Extra_Rc.hpp"" added in my description.ext and that is all. I've only been using it for bloodbags so I never really knew there was more needed.
 
Okay, I got it showing the options now. So far it seems to be working gotta add one last thing and it should be done enough for testing. The options appear for each skin type and have the option to click them. They are labeled such as Hero camo, bandit camo etc. If a bandit clicks the hero one, in skins.sqf it exits due to humanity and tells the player their humanity and how much they need to gain. Vice versa with heros clicking on bandit items, they are told how much they need to lose in order to wear the skin.
 
This is what I've got so far, haven't tested it but I put it into action on my server.... so hopefully its all working lol
extra_rc.hpp
Code:
class ExtraRc {
    class ItemBloodbag {
        class Self_Bloodbag {
            text = "Self Bloodbag";
            script =  "execVM 'custom\fn_self\player_selfbloodbag_rc.sqf'";
        };
    };
    class Skin_Camo1_DZ {
        class skin1 {
            text = "Hero Camo";
            script =  "['camoh','Skin_Camo1_DZ','FR_GL'] execVM 'custom\skins.sqf';";
        };
        class skin2 {
            text = "Bandit Camo";
            script =  "['camob','Skin_Camo1_DZ','GUE_Soldier_CO'] execVM 'custom\skins.sqf';";
        };
    };
    class Skin_Sniper1_DZ {
        class skin3 {
            text = "Hero Ghillie";
            script =  "['sniperh','Skin_Sniper1_DZ','GUE_Soldier_Sniper'] execVM 'custom\skins.sqf';";
        };
        class skin4 {
            text = "Bandit Ghillie";
            script =  "['sniperb','Skin_Sniper1_DZ','Ins_Soldier_Sniper'] execVM 'custom\skins.sqf';";
        };
    };
    class Skin_Soldier1_DZ {
        class skin5 {
            text = "Hero Soldier";
            script =  "['soldierh','Skin_Soldier1_DZ','GUE_Commander'] execVM 'custom\skins.sqf';";
        };
        class ski6 {
            text = "Bandit Soldier";
            script =  "['soldierb','Skin_Soldier1_DZ','TK_Soldier_EP1'] execVM 'custom\skins.sqf';";
        };
    };
    class Skin_Survivor2_DZ {
        class skin7 {
            text = "Wear Taki Civ";
            script = "['normal','Skin_Survivor2_DZ','TK_GUE_Soldier_Sniper_EP1'] execVM 'custom\skins.sqf';";
        };
        class skin8 {
            text = "Wear Bodyguard";
            script = "['normal','Skin_Survivor2_DZ','Soldier_Bodyguard_M4_PMC'] execVM 'custom\skins.sqf';";
        };
        class skin9 {
            text = "Wear Bodyguard 2";
            script = "['normal','Skin_Survivor2_DZ','Soldier_Bodyguard_AA12_PMC'] execVM 'custom\skins.sqf';";
        };
    };
};
skins.sqf
Code:
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"];
};

EDIT*

Script completely works how I want it to, still wish I could figure out a way to add a humanity check for the clickable action to be shown.
 
Last edited:
Back
Top