Jump to content

SCRIPT BASE TO CRAFT OBJETS.


juandayz

Recommended Posts

  • 4 weeks later...
  On 1/2/2017 at 11:54 AM, jimmy565 said:

Hey @juandayz , What if i had more than one item would i do  &&  {type != "YOUR OBJECT ID","YOUR OBJECT ID"}) then { or would i do something else

 

Expand  

more than 1 object do you say-

you will need a variable.sqf  then find

DayZ_SafeObjects =

above paste:

DZE_CUSTOMOBJECTS = ["ALL","YOUR","OBJECTS"];

now into

DayZ_SafeObjects =

change by:

DayZ_SafeObjects = DZE_CUSTOMOBJECTS + ["the others default objects from epoch",""];

now go to your server_monitor.sqf

find:

_isPlot = _type == "Plastic_Pole_EP1_DZ";

bellow paste

_isCustomObjects = _type in DZE_CUSTOMOBJECTS;

Now find:

if( (count _inventory > 0) && !_isPlot && !_doorLocked) then {

change by:

if( (count _inventory > 0) && !_isPlot && !_doorLocked && !_isCustomObjects) then {

 

hope it help you

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
  • 1 month later...
  • 5 weeks later...
  On 7/24/2017 at 4:32 AM, NateDayZ said:

Hi, am I able to make it so the object saves to database, only works on your plotpole and only player who made object can remove it?

 

Expand  

yes, you need add a restriction for check nearest poles and in configvariables you have an option to restrict some objects from being be removed.

DZE_restrictRemoval = ["your object id","the rest of default objects"];

pole restriction:

_playerPos = getPosATL player;
_nearRestr = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 27] > 0;

if !(_nearRestr) exitWith {
DZE_ActionInProgress = false;
cutText [format["Needs be in plot pole area"], "PLAIN DOWN"];
};

 

Link to comment
Share on other sites

  On 8/22/2017 at 8:25 PM, juandayz said:

yes, you need add a restriction for check nearest poles and in configvariables you have an option to restrict some objects from being be removed.

DZE_restrictRemoval = ["your object id","the rest of default objects"];

pole restriction:

_playerPos = getPosATL player;
_nearRestr = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 27] > 0;

if !(_nearRestr) exitWith {
DZE_ActionInProgress = false;
cutText [format["Needs be in plot pole area"], "PLAIN DOWN"];
};

 

Expand  

Thank you :)

Link to comment
Share on other sites

  On 8/23/2017 at 12:31 AM, juandayz said:

please paste how do you do it. step by step

Expand  

 

Server_monitor

if( (count _inventory > 0) && !_isPlot && !_doorLocked && {_type != "MAP_kulna"}) then {

I put the script in my mission folder and I call it with right click actions on toolbox

 

    ["ItemToolbox","Build kulna","execVM 'addons\kulna.sqf';","true"],

 

When I go ingame and right click my toolbox I am able to build the kulna but when I restart the server it is gone and I do not see it in the database.

Link to comment
Share on other sites

  On 8/23/2017 at 12:36 AM, NateDayZ said:

 

Server_monitor

if( (count _inventory > 0) && !_isPlot && !_doorLocked && {_type != "MAP_kulna"}) then {

I put the script in my mission folder and I call it with right click actions on toolbox

 

    ["ItemToolbox","Build kulna","execVM 'addons\kulna.sqf';","true"],

 

When I go ingame and right click my toolbox I am able to build the kulna but when I restart the server it is gone and I do not see it in the database.

Expand  

are you missing this entry in custom variables.sqf?

DayZ_SafeObjects = ["YOUR OBJECT ID","the others default objects from epoch",""];
Link to comment
Share on other sites

  • 2 weeks later...

Hey Juan I have two issues could you help :)?

 

https://pastebin.com/mYP7My40

 

When placing the object it says "Placing "OBJECT" move to cancel" but I can not cancel even if I move.

Another thing is when there is no plot pole in the area it says "Needs be in plot pole area" which is fine but then when you try again it says "building already in progress" and you cannot build anything until relog.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...