Jump to content
  • 0

Allow spawning bike/mozzie in safe zones and near plot polls?


Vladick

Question

Hi there,

I am running a DayZ Epoch 1.0.6.1 server and have added the script that allows spawning a bike from a tool box or a mozzie from assorted parts. However, players cannot spawn these items in the safe zones or near plot polls. Does anyone know where and what I can edit to make players able to spawn these items in these zones?

Thanks for your help!

Vladick

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0
1 hour ago, Vladick said:

Hi there,

I am running a DayZ Epoch 1.0.6.1 server and have added the script that allows spawning a bike from a tool box or a mozzie from assorted parts. However, players cannot spawn these items in the safe zones or near plot polls. Does anyone know where and what I can edit to make players able to spawn these items in these zones?

Thanks for your help!

Vladick

Please post the code thatyoure using for it.

Link to comment
Share on other sites

  • 0
31 minutes ago, juandayz said:

Please post the code thatyoure using for it.

Here is the contents of the config.sqf, but there are other files in the package including deploy.sqf, functions.sqf, init.sqf, pack.sqf, player_deploy.sqf and wrapper.sqf.

Thanks for any help you can give!

//  **FORMAT** -- (note no comma after last array entry)
//
//  DZE_DEPLOYABLES_CONFIG = [
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_ammo,_hive,_plot,_simulation,_road,_deployables,_near,_parts,_condition],
//      [...more stuff here...]
//  ];
//    
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _clickItem    | class name of the item to click on                                  | string | "ItemToolbox"
// _deployOffset | [_side,_front,_up] array to offset the deployable when buiding      | array  | [0,2,1]
// _packDistance | how close does the packer need to be to pack the object?            | number | 5
// _damageLimit  | item can't be repacked if damage is > this. (-1 = no re-packing)    | number | 0.1
// _packAny      | can anyone repack the deployable?                                   | bool   | false
// _cargo        | clear the cargo of the deployable?                                  | bool   | false
// _ammo         | should vehicle ammo be cleared? (does not persist through restart)  | bool   | true
// _hive         | write deployable to database?                                       | bool   | false
// _plot         | require a plot from the owner to build the deployable?              | bool   | false
// _simulation   | enable simulation (movement/damage) for the object? (true for cars) | bool   | true
// _road         | enable road building for this object?                               | bool   | true
// _deployables  | array of class names that can be deployed with this method          | array  | ["MMT_Civ"]
// _near         | array of items required nearby to build (workshop/fire/fueltank)    | array  | []
// _parts        | array of parts required to build (will be taken from player)        | array  | ["ItemToolbox"]
// _condition    | string of code to evaluate to determine whether action is shown     | string | "!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"

DZE_DEPLOYABLES_CONFIG = [
    // deploy a non-permanent bike from a toolbox right in front of the player that can be re-packed by the owner as long as it's under 10% damage
    ["ItemToolbox",[0,6,1],5,0.1,false,false,false,false,false,true,true,["MMT_Civ"],[],["ItemToolbox"],"true"],
    // deploy fortifications from etool 3 meters in front of player that are permanent until server restart
    //["ItemEtool",[0,3,0],5,-1,false,true,false,true,false,false,["Land_fort_rampart","Fort_StoneWall_EP1","Land_fort_bagfence_round"],[],["ItemEtool"],"false"],
    // deploy a permanent helicopter from ruby 5 meters in front of player that can be re-packed by anyone as long as it's under 10% damage
    ["ItemRuby",[0,5,2],7,0.1,true,true,true,true,false,true,true,["AH6X_DZ","UH1Y_DZ"],[],["ItemRuby"],"true"],
    // deploy military housing in front of the player that is permanent but can't be re-packed by anyone
    ["ItemEmerald",[0,8,0],10,-1,false,false,false,true,true,false,false,["Barrack2","Land_fortified_nest_small_EP1"],[],["ItemEmerald"],"!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}"],
    ["ItemCitrine",[0,1,1],5,1,false,true,false,true,true,false,false,["Baseball","Loudspeaker","MetalBucket","Misc_Videoprojektor","Misc_Videoprojektor_platno","Misc_Wall_lamp","Notebook","SatPhone","Radio","SmallTV","Suitcase"],[],["ItemCitrine"],"false"],
    // deploy some housing items from parts piles in front of the player that are permanent but can be re-packed by anyone
    ["PartGeneric",[0,2,0],5,1,true,true,false,true,true,false,false,["Desk","FoldChair","FoldTable","SmallTable","Barrel1","Garbage_can"],[],["PartGeneric"],"false"],
    // deploy some housing items from wood piles in front of the player that are permanent but can be re-packed by anyone
    ["PartWoodPile",[0,2,0],5,1,true,true,false,true,true,false,false,["Land_Rack_EP1","Land_Table_EP1","Land_Shelf_EP1","WoodChair","Park_bench2","Park_bench1"],[],["PartWoodPile"],"false"],
    // deploy concrete barricades from cinderblocks 2m in front of the player, that are permanent and can only be re-packed by the person who placed them
    ["CinderBlocks",[0,2,0],5,1,false,true,false,false,false,true,true,["Hhedgehog_concrete","Land_CncBlock","Land_CncBlock_Stripes"],[],["CinderBlocks"],"false"],
    // deploy a mozzie in front of the player from a rotor/engine/fueltank
    ["ItemToolbox",[0,8,2],7,0.1,true,true,false,true,false,true,true,["CSJ_GyroC"],[],["PartVRotor","PartEngine","PartFueltank"],"true"],
    ["ItemToolbox",[0,10,0],5,-1,false,true,false,true,true,false,false,["Land_Mil_Guardhouse"],[],["cinder_wall_kit","cinder_wall_kit","cinder_wall_kit","cinder_door_kit"],"false"],
    ["ItemCrowbar",[0,6,0],5,-1,false,true,false,true,true,false,false,["Land_Misc_Cargo1Ao","Land_Misc_Cargo1Bo"],[],["metal_panel_kit","metal_panel_kit","metal_panel_kit","metal_panel_kit"],"false"]
    //["ItemEtool",[0,8,0],5,-1,false,true,true,true,false,false,["Land_Fort_Watchtower"],[],["forest_large_net_kit","ItemSandbagExLarge5x","ItemSandbagExLarge5x","ItemSandbagExLarge5x"],"false"],
    //["ItemEtool",[0,8,0],5,-1,false,true,true,true,false,false,["Land_fortified_nest_big"],[],["ItemSandbagExLarge5x","ItemSandbagExLarge5x","ItemSandbagExLarge5x"],"false"],
    //["PartWoodPile",[0,2,0],5,1,true,true,true,true,false,false,["Pile_of_wood"],[],["PartWoodPile","PartWoodPile","PartWoodPile","PartWoodPile","PartWoodPile"],"false"],
    //["ItemSapphire",[0,2,0],5,1,true,true,true,true,false,false,["DSHKM_CDF","M2StaticMG","SearchLight_CDF"],[],["ItemSapphire"],"false"]
];

// **DZE_DEPLOYABLE_NAME_MAP format
//  
//  DZE_DEPLOYABLE_NAME_MAP = [
//      [_class,_name],
//      [_class,_name],
//      [... more ...]
//  ];
//
//  parameter    | description                                                         |  type  | example
// --------------|---------------------------------------------------------------------|--------|--------
// _class        | class name of the item you want to replace the name of              | string | "Notebook"
// _name         | new name to display when right clicking                             | string | "Macbook Pro"
//
DZE_DEPLOYABLE_NAME_MAP = [
    ["Notebook","Macbook Pro"]
];

DZE_DEPLOYABLE_ADMINS = [];

Link to comment
Share on other sites

  • 0

First of all there is an option to post code on this forum. Please do us a favor and use this feature next time.

And if you only give us the config, we can't really do much. The config just sets up what can be deployed. That you are not able to deploy anthing in safezones or plotpoles is not related to the config file.

Link to comment
Share on other sites

  • 0
21 minutes ago, DAmNRelentless said:

First of all there is an option to post code on this forum. Please do us a favor and use this feature next time.

And if you only give us the config, we can't really do much. The config just sets up what can be deployed. That you are not able to deploy anthing in safezones or plotpoles is not related to the config file.

Sorry, rookie mistake. Forgive my stupidity, but what code from what file do you need to see?

Thanks!

Link to comment
Share on other sites

  • 0
10 minutes ago, DAmNRelentless said:

Pack it into an archive and upload it.

Sorry, still stupid over here... Pack what, the mission pbo or something else? And I can't figure out where to upload it to. The "drag files here to attach" option only takes picture files and the "insert other media" option doesn't work for that either. Where do I upload to?

Thanks! 

Link to comment
Share on other sites

  • 0
33 minutes ago, Vladick said:

Sorry, still stupid over here... Pack what, the mission pbo or something else? And I can't figure out where to upload it to. The "drag files here to attach" option only takes picture files and the "insert other media" option doesn't work for that either. Where do I upload to?

Thanks! 

Hello,

As it stands, deploy anything doesn't work with the new way epoch does plots etc.

This is fixed in the fork that I have done of it here: https://github.com/oiad/DayZEpochDeployableBike/tree/master/addons/bike

Link to comment
Share on other sites

  • 0

Hello 

In file config.sqf  around the line 26 add this line :

DeployInSafeZones = true;

In file player_deploy.sqf replace this line :

if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };

by this:

if(!canbuild and !DeployInSafeZones) then { _cancel = true; _reason = "Cannot build in a city."; };

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...