Jump to content
salival

[Release] Zabns Take Clothes [Updated for 1.0.7]

Recommended Posts

Hi,

Since Zabn is MIA I have updated his Take Clothes script to 1.0.7 compatible.

Github with install instructions and download location: https://github.com/oiad/TakeClothes

 

 

**** For Epoch 1.0.6.2 only **** >> Download <<

Visit this link: https://github.com/oiad/TakeClothes/tree/Epoch_1.0.6.2

(original install url: http://opendayz.net/threads/release-zabns-take-clothes-2-0.19290/)

(original discussion url: http://opendayz.net/threads/help-discussion-zabns-take-clothes.13198/)

 

Share this post


Link to post
Share on other sites
6 hours ago, oldmatechoc said:

Just curious would this need the anti dupe added?

Im not on 1.0.6 so not sure how it works on there.

 

private ["_countplayers",


_countplayers = count nearestObjects [player, ["CAManBase"], 5];
if (_countplayers > 2) exitWith { cutText [format["Cannot take clothes if another players is near"], "PLAIN DOWN"]; };

not tested^^

I did have that in my local copy but not on github, I don't know why, I've pushed it anyway: https://github.com/oiad/TakeClothes/commit/e8520149108880aaebaa72f7a3534c9f99c0807d 

Cheers

Share this post


Link to post
Share on other sites
On 12/31/2016 at 4:14 PM, salival said:

Hi,

Since Zabn is MIA I have updated his Take Clothes script to 1.0.6 compatible.

(original install url: http://opendayz.net/threads/release-zabns-take-clothes-2-0.19290/)

(original discussion url: http://opendayz.net/threads/help-discussion-zabns-take-clothes.13198/)

Github with install instructions and download location: https://github.com/oiad/TakeClothes

Works perfect!

I followed the easy instructions - No issues

Thank You,

Share this post


Link to post
Share on other sites

Hello, 

I'm not sure if this is related to take clothes script or not but we can not change skins anymore. 

This script still works fine and we can take skins but we're unable to use them.

Every skin I try to wear will turn in to "Civilian Clothing" and nothing happens.

any ideas?

(I also use ESS3 if it makes any difference)

I have reinstalled on test server - still same result.

Thanks, 

Share this post


Link to post
Share on other sites

Hey, all this mod does is give you the physical skin item, I would think you have something elsewhere wrong.

Need to make sure the skins you are loading on your ai/players are in the allplayers variable in the default epoch variables.swf or your version or they will revert to civilian

Share this post


Link to post
Share on other sites
1 hour ago, salival said:

Hey, all this mod does is give you the physical skin item, I would think you have something elsewhere wrong.

Need to make sure the skins you are loading on your ai/players are in the allplayers variable in the default epoch variables.swf or your version or they will revert to civilian

Thank you - I'll look at the allplayers variable now. That sounds like it might be the problem. 

Share this post


Link to post
Share on other sites

@salival i have a stupid doubt about the _clothestaken (when you get the variable) i dont say its no works,,but  only i cannot understand and is killing my head why its works :D.

for example in fn_selfactions..

_clothesTaken = _cursorTarget getVariable["clothesTaken",false];

if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {

your saying if is a player and hes dead and is not a zed and the clothestaken variable is set as true (!_clothesTaken) 

so its means the _clothesTaken must be  "_clothesTaken = _cursorTarget getVariable["clothesTaken",true,true];  "  right?

now in the sqf

you write:

_body = _this select 3; 

here you call for get the _body variable

_clothesTaken = _body getVariable["clothesTaken",false];

if (!_clothesTaken) then { 

so again its mean !_clothesTaken  if is _body clothestaken is true ?

well if is not _clothestaken you proceed with the take clothes.. and when u got it.. you change the clothestaken variable as true

_body setVariable["clothesTaken",true,true];

This is what i cannot understand.... when you finish it you set the clothestaken variable as !_clothestaken

 

 

 

Share this post


Link to post
Share on other sites
1 hour ago, juandayz said:

@salival i have a stupid doubt about the _clothestaken (when you get the variable) i dont say its no works,,but  only i cannot understand and is killing my head why its works :D.

for example in fn_selfactions..

_clothesTaken = _cursorTarget getVariable["clothesTaken",false];

if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {

your saying if is a player and hes dead and is not a zed and the clothestaken variable is set as true (!_clothesTaken) 

so its means the _clothesTaken must be  "_clothesTaken = _cursorTarget getVariable["clothesTaken",true,true];  "  right?

now in the sqf

you write:

_body = _this select 3; 

here you call for get the _body variable

_clothesTaken = _body getVariable["clothesTaken",false];

if (!_clothesTaken) then { 

so again its mean !_clothesTaken  if is _body clothestaken is true ?

well if is not _clothestaken you proceed with the take clothes.. and when u got it.. you change the clothestaken variable as true

_body setVariable["clothesTaken",true,true];

This is what i cannot understand.... when you finish it you set the clothestaken variable as !_clothestaken

 

 

 

if !_clothesTaken means

If the clothes are not already taken from the body.

So at first the clothes are not taken ofcourse and at the end if you take the clothes of the body, they are taken ofcourse so:
_body setVariable["clothesTaken",true,true];

Share this post


Link to post
Share on other sites
28 minutes ago, DAmNRelentless said:

if !_clothesTaken means

If the clothes are not already taken from the body.

So at first the clothes are not taken ofcourse and at the end if you take the clothes of the body, they are taken ofcourse so:
_body setVariable["clothesTaken",true,true];

YUP but why at the very first selfactions use  !_clothesTaken  and define it as false..     so if is !clothesTaken then its means _clothesTaken is true. this is what im getting me crazy:laugh:

 

for example if u say

_item = "PartGeneric" in magazines player;

if !(_item) then {};  //that means proceed if you dont have the item.

 

so here

_clothesTaken = _cursorTarget getVariable["clothesTaken",false];

if !(_clothesTaken) then {}; //proceed if clothesTaken is true.

not false as is seted as default.. cuz when you launch the sqf , it set as true to not use the corpse again

 

Share this post


Link to post
Share on other sites

I think you are getting confused on how getVariable works: https://community.bistudio.com/wiki/getVariable

i'm using it to see if the body has the variable "clothesTaken" set on it.

_clothesTaken = _cursorTarget getVariable["clothesTaken",false];

So what this is doing is checking to see if it's set, if it is NOT set, it will set it to false by default (the second part of the getVariable array) which means the body is OK to take the clothes from

Let's say for instance the body didn't have the clothesTaken set on it at all, the first time your selfActions looks at it, it will set get the variable and it will be false

The fn_selfActions will evaluate this line: 

if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {

if it is a man and is NOT alive and is NOT zombie and is NOT clothesTaken (clothesTaken is NOT equal to true) then proceed

So if the player takes the clothes the script will set the body to clothesTaken,true.

the fn_selfActions will evaluate again from then on:

_clothesTaken = _cursorTarget getVariable["clothesTaken",false];

will now return _clothesTaken = true;

if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {

if it is a man and is NOT alive and is NOT a zombie and is NOT clothesTaken, it will fail when evaluating the _clothesTaken because it is true.

Share this post


Link to post
Share on other sites

Hey guys!

I have my own Epoch 1.0.6.1 for a couple of days now, so I'm pretty new to this.

 

Did I get it right that I have to extract the fn_selfActions.sqf, compiles.sqf and variables.sqf, then edit them as described and put them back in the dayz_code.pbo, before reuploding it to my server?

My problem: I'm not able to do steps 6. and 7. since the lines mentioned aren't in my fn_selfActions.sqf...

Maybe it's because of one of the following scripts I already have on the server:

Vehicle Service Point (Refuel, Repair, Rearm) [Updated for 1.0.6.1] from @salival

ESSV3 - Enhanced Spawn Selection from @ebayShopper

LOGISTIC - TOW / LIFT from @nightmare

I didn't have any problems getting those 3 to work, but I just don't really get how to work with those three files mentioned above - what's driving me really crazy since most of the scripts I'd like to try out next include working with them...

 

Looking forward to your replies!

Share this post


Link to post
Share on other sites
On 29.8.2017 at 11:36 PM, JasonTM said:

Yeah, the install instructions are missing some steps and formatting could use some work.

@Aelenia this video walks you through installing this mod.

https://www.youtube.com/watch?v=OEc9p4SAVzE

 

Hey!

Sorry it took me that long, but just tried it out again and it worked perfectly.

Thank you very much for helping and making that video!

Share this post


Link to post
Share on other sites

Okay, now I have another question... Since this script worked now, I wanted to try out this one as well:

It also requires working with fn_selfActions.sqf, compiles.sqf and variables.sqf. Salival talks about "merging" the codes, if custom files already exist. I tried to figure out where there are diferences between e.g. the compiles.sqf provided in this take clothes script and the compiles.sqf provided in the vkc script and just adjusted one of them (meaning adding the lines missing from the vkc one to the take clothes one, because this was working before), but obviously did something wrong - vkc is working now, but take clothes not. Is there an easy and fast way to "merge" the files, because just comparing them not only takes a lot of time, but like I said I obviously also changed a line that was necessary for take clothes.

Share this post


Link to post
Share on other sites
Just now, Aelenia said:

Okay, now I have another question... Since this script worked now, I wanted to try out this one as well:

It also requires working with fn_selfActions.sqf, compiles.sqf and variables.sqf. Salival talks about "merging" the codes, if custom files already exist. I tried to figure out where there are diferences between e.g. the compiles.sqf provided in this take clothes script and the compiles.sqf provided in the vkc script and just adjusted one of them (meaning adding the lines missing from the vkc one to the take clothes one, because this was working before), but obviously did something wrong - vkc is working now, but take clothes not. Is there an easy and fast way to "merge" the files, because just comparing them not only takes a lot of time, but like I said I obviously also changed a line that was necessary for take clothes.

salival´s guide have a tuto for users who already have another version.. so you can use this steps to find the codes..

and merge.

example:  in fn_selfactions.sqf  find this block:

Spoiler
// Allow Owner to lock and unlock vehicle  
	if (_player_lockUnlock_crtl) then {
		if (s_player_lockUnlock_crtl < 0) then {
			_totalKeys = call epoch_tempKeys;
			_temp_keys = _totalKeys select 0;
			_temp_keys_names = _totalKeys select 1;
			_hasKey = _characterID in _temp_keys;
			_oldOwner = (_characterID == _uid);
			if (locked _cursorTarget) then {
				if (_hasKey || _oldOwner) then {
					_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (_temp_keys find _characterID))], 2, true, true];
					s_player_lockunlock set [count s_player_lockunlock,_unlock];
					s_player_lockUnlock_crtl = 1;
				} else {
					if (_hasHotwireKit) then {
						_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true];
					} else {
						_unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true];
					};
					s_player_lockunlock set [count s_player_lockunlock,_unlock];
					s_player_lockUnlock_crtl = 1;
				};
			} else {
				if (_hasKey || _oldOwner) then {
					_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true];
					s_player_lockunlock set [count s_player_lockunlock,_lock];
					s_player_lockUnlock_crtl = 1;
				};
			};
		};	 
	} else {
		{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
		s_player_lockUnlock_crtl = -1;
	};

 

replace by:

Spoiler
// Allow Owner to lock and unlock vehicle  
	if (_player_lockUnlock_crtl) then {
		_totalKeys = call epoch_tempKeys;
		_temp_keys = _totalKeys select 0;
		_temp_keys_names = _totalKeys select 1;
		_hasKey = _characterID in _temp_keys;
		
		if (s_player_lockUnlock_crtl < 0) then {
			_oldOwner = (_characterID == _uid);
			if (_isLocked) then {
				if (_hasKey || {_oldOwner}) then {
					_temp_key_name = (_temp_keys_names select (_temp_keys find _characterID));
					_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,_temp_key_name], 2, true, true];
					s_player_lockunlock set [count s_player_lockunlock,_unlock];
					s_player_lockUnlock_crtl = 1;
				} else {
					if (_hasHotwireKit) then {
						_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true];
					} else {
						_unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true];
					};
					s_player_lockunlock set [count s_player_lockunlock,_unlock];
					s_player_lockUnlock_crtl = 1;
				};
			} else {
				if (_hasKey || _oldOwner) then {
					_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true];
					s_player_lockunlock set [count s_player_lockunlock,_lock];
					s_player_lockUnlock_crtl = 1;
				};
			};
		};
		if (s_player_copyToKey < 0) then {
			if (_hasKey && {_hasKeyKit} && {(count _temp_keys) > 1} && {!_isLocked}) then {
				s_player_copyToKey = player addAction ["<t color=""#0096FF"">Change vehicle key</t>","scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"change"],5,false,true];
			};
		};
	} else {
		{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
		s_player_lockUnlock_crtl = -1;
		player removeAction s_player_copyToKey;
		s_player_copyToKey = -1;
	};

 

Find:

Spoiler
//Towing with tow truck
	/*
	if(_typeOfCursorTarget == "TOW_DZE") then {
		if (s_player_towing < 0) then {
			if(!(_cursorTarget getVariable ["DZEinTow", false])) then {
				s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true];				
			} else {
				s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true];				
			};
		};
	} else {
		player removeAction s_player_towing;
		s_player_towing = -1;
	};
	*/

 

below paste:

Spoiler
if (_isVehicle && {_characterID == "0"} && {_hasKeyKit} && {!_isMan} && {_isAlive}) then {
		if (s_player_claimVehicle < 0) then {
			_totalKeys = call epoch_tempKeys;
			if (count (_totalKeys select 0) > 0) then {
				s_player_claimVehicle = player addAction [format ["<t color=""#0096FF"">Claim %1</t>",_text],"scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"claim"],5,false,true];
			};
		};
	} else {
		player removeAction s_player_claimVehicle;
		s_player_claimVehicle = -1;
	};

 

find:

Spoiler
player removeAction s_player_fuelauto;
	s_player_fuelauto = -1;
	player removeAction s_player_fuelauto2;
	s_player_fuelauto2 = -1;
	player removeAction s_player_manageDoor;
	s_player_manageDoor = -1;

 

below paste:

Spoiler
player removeAction s_player_copyToKey;
	s_player_copyToKey = -1;
	player removeAction s_player_claimVehicle;
	s_player_claimVehicle = -1;

 

 

2-now in your custom variables.sqf   somewhere above

//Player self-action handles

paste:

vkc_claimPrice = 1000; 
vkc_changePrice = 5000;  

and below:

dayz_resetSelfActions = {

paste:

s_player_copyToKey = -1;
s_player_claimVehicle = -1;

 

about your custom compiles.sqf  You dont need add anything.. cuz salival just are calling a custom fn_selfactions.sqf from here and you already have this call

fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By A Man
      Deploy Anything in version 3.0.1 updated for Epoch 1.0.7.
      https://github.com/oiad/deployAnything
    • By A Man
      This is the official Epoch 1.0.7 Release. Thanks to everbody who took part on this especially helion4.
       
      Changelog: https://github.com/EpochModTeam/DayZ-Epoch/blob/Release_1.0.7/CHANGE LOG 1.0.7.txt
      Report bugs: https://github.com/EpochModTeam/DayZ-Epoch/issues/2123
      Download via Google Drive at the moment: https://drive.google.com/drive/folders/1z94OU_-yz8SGz14Se2txNbcIYu8sEV-p
      The password for the Server Files is: 123456
       
      Edit: Epoch 1.0.7 is now in the DayZ Launcher. Unfortunately Epoch 1.0.6.2 got completely removed. Server Admins have to update to Epoch 1.0.7 now.
    • By A Man
      Release of salivals Crack Lockables script updated for Epoch 1.0.7.
      All information here: https://github.com/oiad/crackLockables
       
    • By A Man
      Hey guys, this is the release of my O9 Gambling Script. If you like to add this feature to your server you can do it now with that offical release.
      Go to github download and install the files:
      O9 Gambling Script
      If you have cards you get a free gambling try.
      You can gamble for 1000, 2000 and 3000 Coins and get the price 1x, 2x and 3x. The script is not optimized but it works out of the box and can be used with overpoch.

    • By Relentless
      Hello there,
      just want to release DZAI for the new Epoch version. This addon is not made by me. The original author is SnarkIndustries.
      Visit his GitHub: https://github.com/SnarkIndustries
      Sadly, he is no longer active and also his donation link is suspended, so I can just give some credits.
      Special thanks to Salival who updated the addon. I just updated the install instructions, cleaned up the repository a bit
      and fixed broken links and paths.
      Download and installation is provided on salivals github.
      https://github.com/oiad/DZAI
      Greetz Relentless :)
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...