Jump to content
mudzereli

[Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing

Recommended Posts

We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection.

In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole?

Thanks

Share this post


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

We're having a problem where players have worked out that you can build a bike half into a wall, get on it and pass through the wall without triggering the anti-wall protection.

In the deploy config I see we can add a condition at the end. does anyone know what the code would be to not let players deploy a bike within x metres of a plot pole?

Thanks

maybe a better idea is add a nearest wall restriction in player_deploy.sqf

Spoiler
FIND:
//### BEGIN MODIFIED CODE: player_deploy
//_classname =    getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
//_classnametmp = _classname;
//_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
//_text =         getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
//_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
_classname      = _index call getDeployableClass;
_classnametmp   = _classname;
_require        = [];
_text           = _index call getDeployableDisplay;
_ghost          = "";
//### END MODIFIED CODE: player_deploy

PASTE BELOW:



_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith {
dayz_actionInProgress = false;
systemChat("Bikes Not Allowed near of walls");
};

if ure using Two diferents bikes.. then add another check:

_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")or (_classname isKindOf "Old_bike_TK_INS_EP1")) exitWith {
dayz_actionInProgress = false;
systemChat("Bikes Not Allowed near of walls");
};

Share this post


Link to post
Share on other sites
12 minutes ago, juandayz said:

maybe better is add a nearest wall restriction in player_deploy.sqf

FIND:
//### BEGIN MODIFIED CODE: player_deploy
//_classname =    getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
//_classnametmp = _classname;
//_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
//_text =         getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
//_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
_classname      = _index call getDeployableClass;
_classnametmp   = _classname;
_require        = [];
_text           = _index call getDeployableDisplay;
_ghost          = "";
//### END MODIFIED CODE: player_deploy

PASTE BELOW:



_pos = [player] call FNC_GetPos;
_NOTALLOW = ["WoodSmallWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorway_DZ","WoodSmallWallThird_DZ",
"WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","Land_DZE_WoodDoor","Land_DZE_WoodDoorLocked","Land_DZE_GarageWoodDoor","Land_DZE_GarageWoodDoorLocked","WoodLargeWall_DZ",
"WoodLargeWallWin_DZ","WoodLargeWallDoor_DZ","Land_DZE_LargeWoodDoor","Land_DZE_LargeWoodDoorLocked"];

_nearRestr = count nearestObjects [_pos, _NOTALLOW, 5] > 0;

if (_nearRestr && (_classname isKindOf "MMT_Civ")) exitWith {
dayz_actionInProgress = false;
systemChat("This Object is Not Allowed near of a wall");
};

 

I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it

Share this post


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

I think this is a really good solution, but I think it should be further down after you place the deployable, since the player can be away from the wall/door but the deployable can be "inside" it

Good point. Maybe if we increase the distance from walls? Same distance as the offset of the bike?

Share this post


Link to post
Share on other sites

This is the version I settled on:

in player_deploy.sqf find this line (or similar): 

	if (!(_index call getDeployableBuildOnRoad)) then {if (isOnRoad [_position select 0, _position select 1, 0]) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD";};};

Add this code block after it:

	if (_classname isKindOf "MotorCycle") then {
		if (count (nearestObjects [_position, ["Building","DZE_Housebase"], 5]) > 0) then {
			_cancel = true; 
			_reason = format ["%1 can not be built near a wall/door",_text];
		};
	};

 

Share this post


Link to post
Share on other sites

We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option.

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"]

As you can see above, we have the option "_packAny      | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die.

Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106?

Share this post


Link to post
Share on other sites
4 hours ago, ReDBaroN said:

We use "Land_MBG_Garage_Single_A" as a deployable garage and link virtual garage to this building. When a player deploys this they will only get the pack option during that life. If they die, they lose the option.

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,false,["Land_MBG_Garage_Single_A"],[],["ItemTopaz"],"true"]

As you can see above, we have the option "_packAny      | can anyone repack the deployable?" set to false to prevent random players packing the garage and getting the garage owner's Topaz but, I think it's this that's linking it to character ID which refreshes for players each time they die.

Is there a way to modify the code somehow so it works the same way as other epoch base parts since Plot for Life was built in with version 106?

you could keep it as anyone can repack the deployable and then add it to the garage to restrict removal variable in your ConfigVariables.sqf. The restrict removal option keeps anyone from removing anything from your plot thats in that array without permission on the plot pole first.

Share this post


Link to post
Share on other sites

I'm using your script and it runs fine, works etc. However players are saying they don't get the option to pack or its very difficult to see (EG it only stays for half a second and then they have try and get it again). Whenever I look at the bike its very easy to pack, is there a reason why its hard for players to see the option?

Share this post


Link to post
Share on other sites

@Runewulv Thanks for that idea! :smile: 

@l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with

@Rust You need to add exceptions to your Allowed actions array in infistar:

/*  ALLOWED Actions "_dayzActions" are only used if you have "_CSA =  true;"  */
_dayzActions =
[
......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2"
];

So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2

Hope that makes sense... :) 

Share this post


Link to post
Share on other sites

are you an admin and gave yourself admin access to plot poles on your variables?

 

If you put your UID in the plot management array for plot poles in configvariables.sqf it will make every plot pole act as if you have permission on them.

 

 

Share this post


Link to post
Share on other sites
On 8/22/2017 at 2:10 PM, salival said:

I'm at work at the moment but I stopped using publish_vehicle2 or whatever it is and just used obj publish, there's other stuff to be done to fix it but that's the general thing.

I may look at releasing my fork at some point (there's lots of changes not on my repo 9of my fork) that fixes a lot more things and is designed for static guns/building deployables.s.

@l1nkrx7 This was posted by @salival and this is the fix. I'll show you what my player_deploy.sqf looks like: 

search for if (_proceed) then {

Spoiler

if (_proceed) then {
            if([player,_index] call getHasDeployableParts) then {
                [player,_index] call removeDeployableParts;
                [format[localize "str_build_01",_text],1] call dayz_rollingMessages;
                _tmpbuilt setVariable ["OEMPos",_location,true];
                if (_index call getPermanent) then {
                    _tmpbuilt call fnc_set_temp_deployable_id;
                    if(_index call getDeployableSimulation) then {
                        PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)];
                        publicVariableServer "PVDZ_obj_Publish";
                    } else {
                        PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)];
                        publicVariableServer "PVDZ_obj_Publish";
                    };
                } else {
                    _tmpbuilt call fnc_set_temp_deployable_id;
                };
                if . . . . . ... . . . .. . 

so if you just have it save as object as @salival said then it will work as intended.

Share this post


Link to post
Share on other sites
Spoiler

 

On 11/30/2017 at 9:58 PM, ReDBaroN said:

@Runewulv Thanks for that idea! :smile: 

@l1nkrx7 DB saving already works. Check the config file and make sure you have the DB saving set to true for the deploy option you're having problems with

@Rust You need to add exceptions to your Allowed actions array in infistar:


/*  ALLOWED Actions "_dayzActions" are only used if you have "_CSA =  true;"  */
_dayzActions =
[
......,"DZE_ACTION_DEPLOYABLE_PACK_0","DZE_ACTION_DEPLOYABLE_PACK_2"
];

So, in my example above the first option in the config to deploy that you also want to pack is DZE_ACTION_DEPLOYABLE_PACK_0. I don't need to pack the next on the list but, do with the 3rd hence, DZE_ACTION_DEPLOYABLE_PACK_2

Hope that makes sense... :) 

Thanks for that, worked perfect 

Share this post


Link to post
Share on other sites

Hi all !

When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!".

But after restart a helipad disappears. I using this line in config:

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"]

And one more question:

Where can I change the width of buttons? Screenshot.

Share this post


Link to post
Share on other sites
I have the same problem
8 hours ago, WLF said:

Hi all !

When I deploy a HeliPad (for salival's VirtualGarage script) I see a message "This vehicle is permanent and will persist through server restarts!".

But after restart a helipad disappears. I using this line in config:

["ItemToolbox",[0,9,2],5,0.9,false,true,false,true,true,false,true,["HeliHCivil"],[],[],"true"]

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • By Restplay
      Hello, does anyone have Sector C files for the Napf map? On the island where is the Sürenfeld Observatory.
    • By Restplay
      Hello i created my server from this thread:
       
    • By salival
      Zabns Take Clothes is part of Epoch 1.0.7.1 now.
      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/)
       
    • By salival
      Bury and butcher body is part of Epoch 1.0.7.1 now.
       
      Hi guys,
      Here's my version of the bury/butcher body script. Focus'd on optimization and cleanliness.
      * Tested as working on a blank Epoch 1.0.7 server
      * Contains a server side scheduler module to clean up old weapon crates, graves and crosses after 25 minutes.
      * Removes the flies sound when body is buried for performance.
       
      To download: https://github.com/oiad/buryBodies
       
      **** For Epoch 1.0.6.2 only **** >> Download <<
      Visit this link: https://github.com/oiad/buryBodies/tree/Epoch_1.0.6.2
    • By salival
      Vehicle Key Changer is part of Epoch 1.0.7.1 now.
       
      Hi,
      Here's my version of  @OtterNas3 vehicle key changer.  It was subsequently modified by @Grahame for epoch 1.0.6. Updated for 1.0.7.
      This adds support for briefcases, gems and coins as well as using the epoch vehicle upgrade system to do the key changing/claiming.
      * original discussion url: https://epochmod.com/forum/topic/5972-release-vehicle-key-changer-for-making-masterkey-v-14-updated-06152014/
      * updated discussion url: https://epochmod.com/forum/topic/43048-release-vehicle-key-changer-for-making-masterkey-v-141-updated-for-epoch-106/
      Github link with install directions: https://github.com/oiad/vkc
      **EDIT* Link to a working locate Vehicle script that is able to find multiple vehicles per key: 
       
      **** For Epoch 1.0.6.2 only **** >> Download <<
      Visit this link: https://github.com/oiad/vkc/tree/vkc-Epoch-1.0.6.2
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...