Jump to content

creativv

Member
  • Posts

    191
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by creativv

  1. I do not think this is possible because when the weapon is deleted it is not saved any more in the DB.

    What you could look into is either make the weapons useless (disable them temporary)

    Or maybe force the weapon into a backpack or something .

  2. 11 hours ago, Shawn said:

    There is a fix for the unlimited hotwire vault glitch if anyone wanted.

    
    /** Author: SchwEde aka shinySonic **/
    /** Edited by Shawn **/
    private ["_vault","_message","_isSafe","_isLockBox","_chanceSafe","_chanceLockbox","_mags"];
    _vault = _this select 3;
    _chanceSafe = 5; //chance on Safe to succeed in % use only values between 0 - 100
    _chanceLockbox = 10; //chance on Lockbox to succeed in % use only values between 0 - 100
    if !("ItemHotwireKit" in magazines player) exitWith {    
    	cutText [format["No hotwire in inventory."],"PLAIN DOWN"];
    	_failed = true;
    	DZE_ActionInProgress = false;
    };
    player removeMagazine "ItemHotwireKit";
    
    _isSafe = (typeOf _vault) == "VaultStorageLocked";
    _isLockBox = (typeOf _vault) == "LockboxStorageLocked";
    
    player removeAction s_player_hotwirevault;
    s_player_hotwirevault = -1;
    
    _failed = false;
    DZE_ActionInProgress = true;
    if (_isSafe) then {
    if ((random 10) >= (_chanceSafe/10)) exitWith {
    	_failed = true;
    	_message = ["Woops. Yep, I broke it.","Oh no! The Hotwire Kit broke!","Welp, can't get it open and broke it."] call BIS_fnc_selectRandom;
    	};
    		} else {
    		if (_isLockBox) then {
    			if ((random 10) >= (_chanceLockbox/10)) exitWith {
    				_failed = true;
    				_message = ["Woops. Yep, I broke it.","Oh no! The Hotwire Kit broke!","Welp, can't get it open and broke it."] call BIS_fnc_selectRandom;
    				};
    			} else {
    				_failed = true;
    				_message = ["Woops. Yep, I broke it.","Oh no! The Hotwire Kit broke!","Welp, can't get it open and broke it."] call BIS_fnc_selectRandom;
    			};
    		};
    if (_failed) exitWith {cutText [_message, "PLAIN DOWN"];DZE_ActionInProgress = false;};
    _message = ["I did it! It should be open now.","Got it. Now the vault is open!","Done! I have opened the vault!"] call BIS_fnc_selectRandom;
    cutText [_message, "PLAIN DOWN"];
    
    dayz_combination = _vault getVariable["CharacterID","0"];
    _vault spawn player_unlockVault;
    DZE_ActionInProgress = false;

     

    Not really needed i think you have a mistake in your fn_selfactions , there is already a check if the player has a _HotwireKit  if not then player removeAction s_player_hotwirevault;

  3. Check if you get options to open safes and unlock car doors .

    If not something is defenitly broken in fn_selfactions.

    If you can do all that you indeed messed something up with the selfactions code for plotmanagement , like theduke said .

  4. in extra_rc.hpp :

    class ExtraRc {
    	class Skin_INS_Worker2_DZ { class changeskin1 { text = "Scientist2"; script = "[""Skin_gsc_scientist2"", ""Skin_INS_Worker2_DZ""] call player_wearClothes"; }; };
    	class Skin_INS_Bardak_DZ { class changeskin1 { text = "Scientist1"; script = "[""Skin_gsc_scientist1"", ""Skin_INS_Bardak_DZ""] call player_wearClothes"; }; };
    	class Skin_INS_Soldier_CO_DZ { class changeskin1 { text = "Trooper"; script = "[""Skin_gsc_military_head_grey_AT"", ""Skin_INS_Soldier_CO_DZ""] call player_wearClothes"; }; };
    	class Skin_INS_Soldier_AR_DZ { class changeskin1 { text = "TrooperHelmet"; script = "[""Skin_gsc_military_helmet_wdl"", ""Skin_INS_Soldier_AR_DZ""] call player_wearClothes"; }; };
    	class Skin_INS_Lopotev_DZ { class changeskin1 { text = "SAS1"; script = "[""Skin_SFSG_des_tl"", ""Skin_INS_Lopotev_DZ""] call player_wearClothes"; }; };
    	class Skin_RU_Soldier_Crew_DZ { class changeskin1 { text = "DesertRanger"; script = "[""Skin_Desert_SOF_AC"", ""Skin_RU_Soldier_Crew_DZ""] call player_wearClothes"; }; };
    	class Skin_TK_Commander_EP1_DZ { class changeskin1 { text = "DesertForce"; script = "[""Skin_Desert_SOF_AT"", ""Skin_TK_Commander_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_TK_Soldier_Sniper_EP1_DZ { class changeskin1 { text = "Leeroy"; script = "[""Skin_frb_mark"", ""Skin_TK_Soldier_Sniper_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_TK_Special_Forces_MG_EP1_DZ { class changeskin1 { text = "SpecForce1"; script = "[""Skin_frb_tl_mask"", ""Skin_TK_Special_Forces_MG_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_Soldier_TL_PMC_DZ { class changeskin1 { text = "SAS2"; script = "[""Skin_SFSG_mtp_tl"", ""Skin_Soldier_TL_PMC_DZ""] call player_wearClothes"; }; };
    	class Skin_Soldier_Sniper_PMC_DZ { class changeskin1 { text = "SAS3"; script = "[""Skin_SFSG_wdl_tl"", ""Skin_Soldier_Sniper_PMC_DZ""] call player_wearClothes"; }; };
    	class Skin_Graves_Light_DZ { class changeskin1 { text = "SpecOps"; script = "[""Skin_Mercenary_Default20b "", ""Skin_Graves_Light_DZ""] call player_wearClothes"; }; };
    	class Skin_FR_Rodriguez_DZ { class changeskin1 { text = "Hacker2"; script = "[""Skin_SBH_Alpha_Soldier2"", ""Skin_FR_Rodriguez_DZ""] call player_wearClothes"; }; };
    	class Skin_FR_OHara_DZ { class changeskin1 { text = "WoodSoldier"; script = "[""Skin_MVD_Soldier_AT"", ""Skin_FR_OHara_DZ""] call player_wearClothes"; }; };
    	class Skin_Soldier_Bodyguard_AA12_PMC_DZ { class changeskin1 { text = "Gimp"; script = "[""Skin_Navy_SEAL_diver"", ""Skin_Soldier_Bodyguard_AA12_PMC_DZ""] call player_wearClothes"; }; };
    	class Skin_Drake_Light_DZ { class changeskin1 { text = "Seal"; script = "[""Skin_Navy_SEAL_TL"", ""Skin_Drake_Light_DZ""] call player_wearClothes"; }; };
    	class Skin_CZ_Special_Forces_GL_DES_EP1_DZ { class changeskin1 { text = "TheRussian"; script = "[""Skin_RU_Soldier2"", ""Skin_CZ_Special_Forces_GL_DES_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_TK_INS_Soldier_EP1_DZ { class changeskin1 { text = "Pilot"; script = "[""Skin_USMC_Soldier_Pilot"", ""Skin_TK_INS_Soldier_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Soldier_2_DZ { class changeskin1 { text = "StalkerNeutral"; script = "[""Skin_gsc_eco_stalker_head_neutral"", ""Skin_GUE_Soldier_2_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Soldier_CO_DZ { class changeskin1 { text = "StalkerUrban"; script = "[""Skin_gsc_eco_stalker_mask_camo"", ""Skin_GUE_Soldier_CO_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Soldier_Crew_DZ { class changeskin1 { text = "StalkerElite"; script = "[""Skin_gsc_eco_stalker_mask_duty"", ""Skin_GUE_Soldier_Crew_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Soldier_Sniper_DZ { class changeskin1 { text = "Stalker Camo"; script = "[""Skin_gsc_eco_stalker_mask_fred"", ""Skin_GUE_Soldier_Sniper_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Soldier_MG_DZ { class changeskin1 { text = "StalkerWood"; script = "[""Skin_gsc_eco_stalker_mask_neutral"", ""Skin_GUE_Soldier_MG_DZ""] call player_wearClothes"; }; };
    	class Skin_Bandit2_DZ { class changeskin1 { text = "UrbanSoldier"; script = "[""Skin_US_Delta_Force_Marksman_EP1"", ""Skin_Bandit2_DZ""] call player_wearClothes"; }; };
    	class Skin_Bandit1_DZ { class changeskin1 { text = "Alpha3"; script = "[""Skin_arma1_us_soldier_sabass"", ""Skin_Bandit1_DZ""] call player_wearClothes"; }; };
    	class Skin_Rocker4_DZ { class changeskin1 { text = "Matt"; script = "[""Skin_SFSG_wdl_mrk"", ""Skin_Rocker4_DZ""] call player_wearClothes"; }; };
    	class Skin_Rocker3_DZ { class changeskin1 { text = "Loner"; script = "[""Skin_gsc_eco_stalker_head_fred"", ""Skin_Rocker3_DZ""] call player_wearClothes"; }; };
    	class Skin_Rocker2_DZ { class changeskin1 { text = "Scientist3"; script = "[""Skin_gsc_scientist1_head"", ""Skin_Rocker2_DZ""] call player_wearClothes"; }; };
    	class Skin_Rocker1_DZ { class changeskin1 { text = "Scientist4"; script = "[""Skin_gsc_scientist2_head"", ""Skin_Rocker1_DZ""] call player_wearClothes"; }; };
    	class Skin_Priest_DZ { class changeskin1 { text = "Frank"; script = "[""Skin_Desert_SOF_DA1a"", ""Skin_Priest_DZ""] call player_wearClothes"; }; };
    	class Skin_GUE_Commander_DZ { class changeskin1 { text = "Samuel"; script = "[""Skin_Soldier_Bodyguard_M4_PMC"", ""Skin_GUE_Commander_DZ""] call player_wearClothes"; }; };
    	class Skin_Ins_Soldier_GL_DZ { class changeskin1 { text = "Alpha1"; script = "[""Skin_UKSF_des_mrk"", ""Skin_Ins_Soldier_GL_DZ""] call player_wearClothes"; }; };
    	class Skin_Pilot_EP1_DZ { class changeskin1 { text = "Alpha2"; script = "[""Skin_UKSF_des_mrk_l"", ""Skin_Pilot_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_Haris_Press_EP1_DZ { class changeskin1 { text = "Bravo1"; script = "[""Skin_UKSF_wdl_mrk_l"", ""Skin_Haris_Press_EP1_DZ""] call player_wearClothes"; }; };
    	class Skin_RU_Policeman_DZ { class changeskin1 { text = "Commando"; script = "[""Skin_UKSF_des_demo_l"", ""Skin_RU_Policeman_DZ""] call player_wearClothes"; }; };
    	class Skin_Rocket_DZ { class changeskin1 { text = "Punisher"; script = "[""Skin_UN_CDF_Soldier_Officer_EP1"", ""Skin_Rocket_DZ""] call player_wearClothes"; }; };
    	class Skin_Soldier1_DZ { class changeskin1 { text = "Jonse"; script = "[""Skin_UN_CDF_Soldier_EP1"", ""Skin_Soldier1_DZ""] call player_wearClothes"; }; };
    	class Skin_Camo1_DZ { class changeskin1 { text = "WinterSoldier"; script = "[""Skin_Winter_SOF_DA1b"", ""Skin_Camo1_DZ""] call player_wearClothes"; }; };
    	class Skin_Sniper1_DZ { class changeskin1 {	text = "WinterSniper"; 	script = "[""Skin_Winter_SOF_Marksman"", ""Skin_Sniper1_DZ""] call player_wearClothes"; }; 	};
    };

     

    in variables.sqf underneith AllPlayers add :

    AllPlayers set [count AllPlayers, "gsc_scientist2"];
    AllPlayers set [count AllPlayers, "gsc_scientist1"];
    AllPlayers set [count AllPlayers, "gsc_military_head_grey_AT"];
    AllPlayers set [count AllPlayers, "gsc_military_helmet_wdl"];
    AllPlayers set [count AllPlayers, "SFSG_des_tl"];
    AllPlayers set [count AllPlayers, "Desert_SOF_AC"];
    AllPlayers set [count AllPlayers, "Desert_SOF_AT"];
    AllPlayers set [count AllPlayers, "frb_mark"];
    AllPlayers set [count AllPlayers, "frb_tl_mask"];
    AllPlayers set [count AllPlayers, "SFSG_mtp_tl"];
    AllPlayers set [count AllPlayers, "SFSG_wdl_tl"];
    AllPlayers set [count AllPlayers, "Mercenary_Default20b"];
    AllPlayers set [count AllPlayers, "SBH_Alpha_Soldier1"];
    AllPlayers set [count AllPlayers, "SBH_Alpha_Soldier2"];
    AllPlayers set [count AllPlayers, "MVD_Soldier_AT"];
    AllPlayers set [count AllPlayers, "Navy_SEAL_diver"];
    AllPlayers set [count AllPlayers, "Navy_SEAL_TL"];
    AllPlayers set [count AllPlayers, "RU_Soldier2"];
    AllPlayers set [count AllPlayers, "USMC_Soldier_Pilot"];
    AllPlayers set [count AllPlayers, "SBH_Alpha_Soldier5"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_head_neutral"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_mask_camo"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_mask_duty"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_mask_fred"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_mask_neutral"];
    AllPlayers set [count AllPlayers, "US_Delta_Force_Marksman_EP1"];
    AllPlayers set [count AllPlayers, "arma1_us_soldier_sabass"];
    AllPlayers set [count AllPlayers, "SFSG_wdl_mrk"];
    AllPlayers set [count AllPlayers, "gsc_eco_stalker_head_fred"];
    AllPlayers set [count AllPlayers, "gsc_scientist1_head"];
    AllPlayers set [count AllPlayers, "gsc_scientist2_head"];
    AllPlayers set [count AllPlayers, "Desert_SOF_DA1a"];
    AllPlayers set [count AllPlayers, "FR_Commander"];
    AllPlayers set [count AllPlayers, "Soldier_Bodyguard_M4_PMC"];
    AllPlayers set [count AllPlayers, "UKSF_des_mrk"];
    AllPlayers set [count AllPlayers, "UKSF_des_mrk_l"];
    AllPlayers set [count AllPlayers, "UKSF_wdl_mrk_l"];
    AllPlayers set [count AllPlayers, "UKSF_des_demo_l"];
    AllPlayers set [count AllPlayers, "UN_CDF_Soldier_Officer_EP1"];
    AllPlayers set [count AllPlayers, "UN_CDF_Soldier_EP1"];
    AllPlayers set [count AllPlayers, "Winter_SOF_DA1b"];
    AllPlayers set [count AllPlayers, "Winter_SOF_Marksman"];

    then create a file called skins.hpp and put this in it :

    class skins {
    	class Default {
    		sex = "male";
    		playerModel = "Survivor2_DZ";
    		displayName = "Skin";
    		package = "Skin_Sniper1_DZ";
    	};
    	class Skin_gsc_scientist2 : Default { 
    		sex = "male";
    		playerModel = "gsc_scientist2";
    		displayName = "Scientist2";
    		package = "Skin_INS_Worker2_DZ";
    	};
    	class Skin_gsc_scientist1 : Default { 
    		sex = "male";
    		playerModel = "gsc_scientist1";
    		displayName = "Scientist1";
    		package = "Skin_INS_Bardak_DZ";
    	};
    	class Skin_gsc_military_head_grey_AT : Default { 
    		sex = "male";
    		playerModel = "gsc_military_head_grey_AT";
    		displayName = "Trooper";
    		package = "Skin_INS_Soldier_CO_DZ";
    	};
    	class Skin_gsc_military_helmet_wdl : Default { 
    		sex = "male";
    		playerModel = "gsc_military_helmet_wdl";
    		displayName = "TrooperHelmet";
    		package = "Skin_INS_Soldier_AR_DZ";
    	};
    	class Skin_SFSG_des_tl : Default { 
    		sex = "male";
    		playerModel = "SFSG_des_tl";
    		displayName = "SAS1";
    		package = "Skin_INS_Lopotev_DZ";
    	};
    	class Skin_Desert_SOF_AC : Default { 
    		sex = "male";
    		playerModel = "Desert_SOF_AC";
    		displayName = "DesertRanger";
    		package = "Skin_RU_Soldier_Crew_DZ";
    	};
    	class Skin_Desert_SOF_AT : Default { 
    		sex = "male";
    		playerModel = "Desert_SOF_AT";
    		displayName = "DesertForce";
    		package = "Skin_TK_Commander_EP1_DZ";
    	};
    	class Skin_frb_mark : Default { 
    		sex = "male";
    		playerModel = "frb_mark";
    		displayName = "Leeroy";
    		package = "Skin_TK_Soldier_Sniper_EP1_DZ";
    	};
    	class Skin_frb_tl_mask : Default { 
    		sex = "male";
    		playerModel = "frb_tl_mask";
    		displayName = "SpecForce1";
    		package = "Skin_TK_Special_Forces_MG_EP1_DZ";
    	};
    	class Skin_SFSG_mtp_tl : Default { 
    		sex = "male";
    		playerModel = "SFSG_mtp_tl";
    		displayName = "SAS2";
    		package = "Skin_Soldier_TL_PMC_DZ";
    	};
    	class Skin_SFSG_wdl_tl : Default {
    		sex = "male";
    		playerModel = "SFSG_wdl_tl";
    		displayName = "SAS3";
    		package = "Skin_Soldier_Sniper_PMC_DZ";
    	};
    	class Skin_Mercenary_Default20b : Default { 
    		sex = "male";
    		playerModel = "Mercenary_Default20b";
    		displayName = "SpecOps";
    		package = "Skin_Graves_Light_DZ";
    	};
    	class Skin_SBH_Alpha_Soldier1 : Default { 
    		sex = "male";
    		playerModel = "SBH_Alpha_Soldier1";
    		displayName = "Hacker1";
    		package = "Skin_CZ_Soldier_Sniper_EP1_DZ";
    	};
    	class Skin_SBH_Alpha_Soldier2 : Default { 
    		sex = "male";
    		playerModel = "SBH_Alpha_Soldier2";
    		displayName = "Hacker2";
    		package = "Skin_FR_Rodriguez_DZ";
    	};
    	class Skin_MVD_Soldier_AT : Default { 
    		sex = "male";
    		playerModel = "MVD_Soldier_AT";
    		displayName = "WoodSoldier";
    		package = "Skin_FR_OHara_DZ";
    	};
    	class Skin_Navy_SEAL_diver : Default { 
    		sex = "male";
    		playerModel = "Navy_SEAL_diver";
    		displayName = "Gimp";
    		package = "Skin_Soldier_Bodyguard_AA12_PMC_DZ";
    	};
    	class Skin_Navy_SEAL_TL : Default { 
    		sex = "male";
    		playerModel = "Navy_SEAL_TL";
    		displayName = "Seal";
    		package = "Skin_Drake_Light_DZ";
    	};
    	class Skin_RU_Soldier2 : Default { 
    		sex = "male";
    		playerModel = "RU_Soldier2";
    		displayName = "TheRussian";
    		package = "Skin_CZ_Special_Forces_GL_DES_EP1_DZ";
    	};
    	class Skin_USMC_Soldier_Pilot : Default { 
    		sex = "male";
    		playerModel = "USMC_Soldier_Pilot";
    		displayName = "Pilot";
    		package = "Skin_TK_INS_Soldier_EP1_DZ";
    	};
    	class Skin_SBH_Alpha_Soldier5 : Default { 
    		sex = "male";
    		playerModel = "SBH_Alpha_Soldier5";
    		displayName = "Jak";
    		package = "Skin_TK_INS_Warlord_EP1_DZ";
    	};
    	class Skin_gsc_eco_stalker_head_neutral : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_head_neutral";
    		displayName = "StalkerNeutral";
    		package = "Skin_GUE_Soldier_2_DZ";
    	};
    	class Skin_gsc_eco_stalker_mask_camo : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_mask_camo";
    		displayName = "StalkerUrban";
    		package = "Skin_GUE_Soldier_CO_DZ";
    	};
    	class Skin_gsc_eco_stalker_mask_duty : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_mask_duty";
    		displayName = "StalkerElite";
    		package = "Skin_GUE_Soldier_Crew_DZ";
    	};
    	class Skin_gsc_eco_stalker_mask_fred : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_mask_fred";
    		displayName = "Stalker Camo";
    		package = "Skin_GUE_Soldier_Sniper_DZ";
    	};
    	class Skin_gsc_eco_stalker_mask_neutral : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_mask_neutral";
    		displayName = "StalkerWood";
    		package = "Skin_GUE_Soldier_MG_DZ";
    	};
    	class Skin_US_Delta_Force_Marksman_EP1 : Default { 
    		sex = "male";
    		playerModel = "US_Delta_Force_Marksman_EP1";
    		displayName = "UrbanSoldier";
    		package = "Skin_Bandit2_DZ";
    	};
    	class Skin_arma1_us_soldier_sabass : Default { 
    		sex = "male";
    		playerModel = "arma1_us_soldier_sabass";
    		displayName = "Alpha3";
    		package = "Skin_Bandit1_DZ";
    	};
    	class Skin_SFSG_wdl_mrk : Default { 
    		sex = "male";
    		playerModel = "SFSG_wdl_mrk";
    		displayName = "Matt";
    		package = "Skin_Rocker4_DZ";
    	};
    	class Skin_gsc_eco_stalker_head_fred : Default { 
    		sex = "male";
    		playerModel = "gsc_eco_stalker_head_fred";
    		displayName = "Loner";
    		package = "Skin_Rocker3_DZ";
    	};
    	class Skin_gsc_scientist1_head : Default { 
    		sex = "male";
    		playerModel = "gsc_scientist1_head";
    		displayName = "Scientist3";
    		package = "Skin_Rocker2_DZ";
    	};
    	class Skin_gsc_scientist2_head : Default { 
    		sex = "male";
    		playerModel = "gsc_scientist2_head";
    		displayName = "Scientist4";
    		package = "Skin_Rocker1_DZ";
    	};
    	class Skin_Desert_SOF_DA1a : Default { 
    		sex = "male";
    		playerModel = "Desert_SOF_DA1a";
    		displayName = "Frank";
    		package = "Skin_Priest_DZ";
    	};
    	class Skin_Soldier_Bodyguard_M4_PMC : Default { 
    		sex = "male";
    		playerModel = "Soldier_Bodyguard_M4_PMC";
    		displayName = "Samuel";
    		package = "Skin_GUE_Commander_DZ";
    	};
    	class Skin_UKSF_des_mrk : Default { 
    		sex = "male";
    		playerModel = "UKSF_des_mrk";
    		displayName = "Alpha1";
    		package = "Skin_Ins_Soldier_GL_DZ";
    	};
    	class Skin_UKSF_des_mrk_l : Default { 
    		sex = "male";
    		playerModel = "UKSF_des_mrk_l";
    		displayName = "Alpha2";
    		package = "Skin_Pilot_EP1_DZ";
    	};
    	class Skin_UKSF_wdl_mrk_l : Default { 
    		sex = "male";
    		playerModel = "UKSF_wdl_mrk_l";
    		displayName = "Bravo1";
    		package = "Skin_Haris_Press_EP1_DZ";
    	};
    	class Skin_UKSF_des_demo_l : Default { 
    		sex = "male";
    		playerModel = "UKSF_des_demo_l";
    		displayName = "Commando";
    		package = "Skin_RU_Policeman_DZ";
    	};
    	class Skin_UN_CDF_Soldier_Officer_EP1 : Default { 
    		sex = "male";
    		playerModel = "UN_CDF_Soldier_Officer_EP1";
    		displayName = "Punisher";
    		package = "Skin_Rocket_DZ";
    	};
    	class Skin_UN_CDF_Soldier_EP1 : Default { 
    		sex = "male";
    		playerModel = "UN_CDF_Soldier_EP1";
    		displayName = "Jonse";
    		package = "Skin_Soldier1_DZ";
    	};
    	class Skin_Winter_SOF_DA1b : Default { 
    		sex = "male";
    		playerModel = "Winter_SOF_DA1b";
    		displayName = "WinterSoldier";
    		package = "Skin_Camo1_DZ";
    	};
    	class Skin_Winter_SOF_Marksman : Default { 
    		sex = "male";
    		playerModel = "Winter_SOF_Marksman";
    		displayName = "WinterSniper";
    		package = "Skin_Sniper1_DZ";
    	};
    	class Skin_Sniper_City : Default { 
    		sex = "male";
    		playerModel = "Sniper_City";
    		displayName = "Urban ghillie suit";
    		package = "Skin_Sniper1_DZ";
    	};
    	class Skin_Sniper_Snow : Default { 
    		sex = "male";
    		playerModel = "Sniper_Snow";
    		displayName = "Snow ghillie suit";
    		package = "Skin_Sniper1_DZ";
    	};
    };

    in discription.ext at bottom add skins.hpp

    #include "yourpath\skins.hpp"

    then comes player_wearClothes.sqf if you dont have a custom then get it out of dayz_code and change the path in compiles .

    private ["_item","_skinpkg","_onLadder","_hasclothesitem","_config","_newConfig","_text","_myModel","_itemNew","_currentSex","_newSex","_model"];
    DZE_ActionInProgress = false;
    if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_83") , "PLAIN DOWN"] };
    DZE_ActionInProgress = true;
    if (typeName _this == "ARRAY") then {
    	_item = _this select 0;
    	_skinpkg = _this select 1;
    } else {
    	_item = _this;
    	_skinpkg = _this;
    };
    call gear_ui_init;
    closeDialog 1;
    
    if (!isNil "SkinChangeInProgress") exitWith {
    	DZE_ActionInProgress = false;
    	cutText ['You have already changed your skin, please log to lobby and back to change your skin again!', 'PLAIN'];
    };
    
    _onLadder =	(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
    if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_player_21") , "PLAIN DOWN"]};
    _config = configFile >> "CfgMagazines";
    if (!isClass (_config >> _item)) then {
    	_config = missionConfigFile >> "Skins";
    };
    _hasclothesitem = _skinpkg in magazines player;
    if (!isClass (_config >> _item)) exitWith {DZE_ActionInProgress = false; cutText ["Can not find skin...", "PLAIN DOWN"]};
    _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; 
    systemchat "Drop your backpack in order to change clothes";
    };
    if ("CSGAS" in (magazines player)) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_10"), "PLAIN DOWN"] };
    _myModel = (typeOf player);
    _itemNew = "Skin_" + _myModel;
    _newConfig = if (!isClass(configFile >> "CfgMagazines" >> _itemNew)) then {
    	(missionConfigFile >> "Skins")
    } else {
    	(configFile >> "CfgMagazines")
    };
    if (!isClass (_newConfig >> _itemNew)) exitWith {DZE_ActionInProgress = false; cutText ["Can not find new skin...", "PLAIN DOWN"]};
    _currentSex = if (isClass(configFile >> "CfgSurvival" >> "Skins" >> _itemNew)) then {
    	getText (configFile >> "CfgSurvival" >> "Skins" >> _itemNew >> "sex")
    } else {
    	getText (missionConfigFile >> "Skins" >> _itemNew >> "sex")
    };
    _newSex = if (isClass(configFile >> "CfgSurvival" >> "Skins" >> _item)) then {
    	getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "sex")
    } else {
    	getText (missionConfigFile >> "Skins" >> _item >> "sex")
    };
    if(_currentSex != _newSex) exitWith {
    	cutText [(localize "str_epoch_player_86"), "PLAIN DOWN"];
    };
    _model = if (isClass(configFile >> "CfgSurvival" >> "Skins" >> _item)) then {
    	getText (configFile >> "CfgSurvival" >> "Skins" >> _item >> "playerModel")
    } else {
    	getText (missionConfigFile >> "Skins" >> _item >> "playerModel")
    };
    if (_model != _myModel) then {
    	if(([player,_skinpkg] call BIS_fnc_invRemove) == 1) then {
    		if (!isClass(configFile >> "CfgMagazines" >> _itemNew)) then {
    			player addMagazine getText(missionConfigFile >> "Skins" >> _itemNew >> "package");
    		} else {
    			player addMagazine _itemNew;
    		};
    		[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
    	};
    };
    DZE_ActionInProgress = false;

    Last there is player_takeClothers.sqf :

    // By Zabn 2014
    private["_isEpoch","_itemNew","_onLadder","_config","_skin","_body","_okSkin","_clothesTaken","_itemNewName","_result","_animState","_takeClothesUsageTime","_started","_finished","_takeClothesUseTime"];
    
    if (!isNil "DZE_ActionInProgress") then { // check if this is dayz epoch
    	if (DZE_ActionInProgress) exitWith {}; // Do not allow if any script is running.
    };
    
    _body = (_this select 3) select 0;
    _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
    if (_onLadder) exitWith {cutText ["You can't perform this action while on a ladder!" , "PLAIN DOWN"]};
    
    if (vehicle player != player) exitWith {cutText ["You may not take clothes while in a vehicle", "PLAIN DOWN"]};
    
    player removeAction s_player_clothes;
    s_player_clothes = -1;
    
    _skin = (typeOf _body);
    
    _itemNew = _skin;
    
    switch (_itemNew) do {
    	case "Survivor3_DZ": {
    		_itemNew = "Survivor2_DZ";
    	};
    	case "Bandit1_DZ": {
    		_itemNew = "Survivor2_DZ";
    	};
    };
    
    _itemNew = "Skin_" + _itemNew;
    _config = configFile >> "CfgMagazines" >> _itemNew;
    _okSkin = isClass _config;
    
    if (!_okSkin) then {
    	_config = missionConfigFile >> "Skins" >> _itemNew;
    	_okSkin = isClass _config;
    	_itemNew = getText(_config >> "package");
    };
    
    _takeClothesUseTime = 6;
    
    r_interrupt = false; 
    r_doLoop = true; 
    _takeClothesUsageTime = time;
    _animState = animationState player;
    _started = false;
    _finished = false;
    
    if(_okSkin) then {
    	_clothesTaken = _body getVariable["clothesTaken",false];
    	if(!_clothesTaken) then {
    		while {r_doLoop} do {
    			private ["_isMedic"];
    			
    			_clothesTaken = _body getVariable["clothesTaken",false];
    			_animState = animationState player;
    			_isMedic = ["medic",_animState] call fnc_inString;
    			if(_clothesTaken) then { 
    				r_doLoop = false; 
    			};
    			if (_isMedic) then {
    				_started = true;
    			};
    			if(!_isMedic && !r_interrupt && (time - _takeClothesUsageTime) < _takeClothesUseTime) then {
    				player playActionNow "Medic"; 
    				_isMedic = true;
    			};
    			if (_started && !_isMedic && (time - _takeClothesUsageTime) > _takeClothesUseTime) then {
    				r_doLoop = false; 
    				_finished = true;
    			};
    			if (r_interrupt) then {
    				r_doLoop = false; 
    			};
    			sleep 0.1;
    		};
    		r_doLoop = false; 
    
    		if(_finished) then {
    			_itemNewName = getText (_config >> "displayName");
    			_result = [player,_itemNew] call BIS_fnc_invAdd;
    			if (_result) then {
    				_body setVariable["clothesTaken",true,true];
    				cutText [format["One %1 has been added to your inventory!",_itemNewName], "PLAIN DOWN"];
    			} else {
    				cutText [format["You didn't have enough room to store a %1 :(",_itemNewName], "PLAIN DOWN"];
    			};
    		} else {
    			if(_clothesTaken) then { 
    				player switchMove "";
    				player playActionNow "stop";
    				cutText ["This Skin has already been taken!", "PLAIN DOWN"];
    			} else {
    				r_interrupt = false;
    				player switchMove "";
    				player playActionNow "stop";
    				cutText [format["You have interrupted taking clothes!"], "PLAIN DOWN"]; //display text at bottom center of screen on interrupt
    			};
    		};
    	} else {
    		cutText ["This Skin has already been taken!", "PLAIN DOWN"];
    	};
    };

    Credits go to maca , zabn and some others since its all bits and pieces from several people .

    Hope i didnt forget anything

  5. On ‎17‎-‎1‎-‎2016 at 7:54 PM, BigEgg said:

    This could be because of a variety of issues. I would make sure there are little to no script errors (these can cause lag when lots of players are on) and I would intensify your cleanup scripts.

    I've read somewhere you know more about extdb , would this make the server faster and increase loadfps ?

  6. On ‎1‎-‎2‎-‎2016 at 10:51 AM, Shawn said:

    Hey man, loving what you made here!

    But I did find a bug which is a major issue. When one scrolls and gets the option to "hotwire vault", they can then quickly put the hotwire into their backpack, and the option is still there. This means that safes can be opened without using the hotwire. Essentially, all safes can be opened with 1 hotwire. Could you possibly make a fix for this?

    Thanks!

     

     

×
×
  • Create New...