I've read some threads here about humanity based loadouts and none have really helped me, so I'm creating my own in the hopes of getting this sorted.
I have a custom loadout script I use. I want to further develop it by giving a player a skin based on his humanity. Here's the part that is supposed to do that:
_humanity = player getVariable["humanity",0];
if (_humanity >= 0) then {
DZE_defaultSkin = [["Skin_Soldier_Sniper_PMC_DZ","Skin_GUE_Commander_DZ","Skin_Soldier_Bodyguard_AA12_PMC_DZ","Skin_Haris_Press_EP1_DZ"],["Skin_SurvivorW2_DZ","Skin_SurvivorW3_DZ","Skin_SurvivorWcombat_DZ","Skin_SurvivorWdesert_DZ","Skin_SurvivorWurban_DZ","Skin_SurvivorWpink_DZ"]];
} else {
DZE_defaultSkin = [["Skin_Bandit1_DZ","Skin_GUE_Soldier_MG_DZ","Skin_GUE_Soldier_Crew_DZ","Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ","Skin_Ins_Soldier_GL_DZ"],["Skin_BanditW1_DZ","Skin_BanditW2_DZ"]];
};
When I die and respawn, I get this in my log and spawn with the skins in the first "DZE_defaultSkin" line:
19:21:10 Error in expression < player getVariable["humanity",0];
if (_humanity >= 0) then {
DZE_defaultSkin =>
19:21:10 Error position: <_humanity >= 0) then {
DZE_defaultSkin =>
19:21:10 Error Undefined variable in expression: _humanity
Question
BetterDeadThanZed
I've read some threads here about humanity based loadouts and none have really helped me, so I'm creating my own in the hopes of getting this sorted.
I have a custom loadout script I use. I want to further develop it by giving a player a skin based on his humanity. Here's the part that is supposed to do that:
When I die and respawn, I get this in my log and spawn with the skins in the first "DZE_defaultSkin" line:
Any suggestions?
Link to comment
Share on other sites
11 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