Can anyone say me, how can i add a method, that the skin change for new humanity is random and work this script? I have found this in this forum.
private ["_humanity","_model","_oldBackPack","_oldBackPackType","_newBackPack","_backpackWpn","_backpackMag","_countr"]; if (isServer || isDedicated) exitWith {}; // Humanity Skins waitUntil {!isNil "dayz_animalCheck"}; _oldBackPack = unitBackpack player; _oldBackPackType = (typeOf _oldBackPack); if(_oldBackPackType != "") then { _backpackWpn = getWeaponCargo unitBackpack player; _backpackMag = getMagazineCargo unitBackpack player; }; _humanity = round (player getVariable["humanity", 0]); //Check Survivor if (_humanity > -5000 && _humanity < 5000) exitWith {}; if (!(typeOf player in ["Survivor2_DZ","SurvivorW2_DZ"])) exitWith { systemchat "<System>: Humanity skin change being run on an existing player."; }; //Check Hero if (_humanity < 15000 && _humanity >= 5000) then { if (typeOf player == "Survivor2_DZ") then { _model = "INS_Worker2_DZ"; } else { _model = "SurvivorWpink_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; if (_humanity < 30000 && _humanity >= 15000) then { if (typeOf player == "Survivor2_DZ") then { _model = "CZ_Special_Forces_GL_DES_EP1_DZ"; } else { _model = "SurvivorWurban_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; if (_humanity >= 30000) then { if (typeOf player == "Survivor2_DZ") then { _model = "Camo1_DZ"; } else { _model = "SurvivorWcombat_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; //Check Bandit if (_humanity > -15000 && _humanity <= -5000) then { if (typeOf player == "Survivor2_DZ") then { _model = "Bandit1_DZ"; } else { _model = "BanditW1_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; if (_humanity > -30000 && _humanity <= -15000) then { if (typeOf player == "Survivor2_DZ") then { _model = "GUE_Soldier_Sniper_DZ"; } else { _model = "SurvivorWurban_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; if (_humanity <= -30000) then { if (typeOf player == "Survivor2_DZ") then { _model = "GUE_Commander_DZ"; } else { _model = "SurvivorWdesert_DZ"; }; [dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph; }; sleep 4; if (!isNil "_oldBackPackType") then { if (_oldBackPackType != "") then { player addBackpack _oldBackPackType; _newBackPack = unitBackpack player; _backpackWpnTypes = []; _backpackWpnQtys = []; if (count _backpackWpn > 0) then { _backpackWpnTypes = _backpackWpn select 0; _backpackWpnQtys = _backpackWpn select 1; }; _countr = 0; { _newBackPack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)]; _countr = _countr + 1; } forEach _backpackWpnTypes; _backpackmagTypes = []; _backpackmagQtys = []; if (count _backpackmag > 0) then { _backpackmagTypes = _backpackMag select 0; _backpackmagQtys = _backpackMag select 1; }; _countr = 0; { _newBackPack addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)]; _countr = _countr + 1; } forEach _backpackmagTypes; }; };
Thank you for help. My englisch is a little mad, sorry