Jump to content

SCRIPT BASE TO CRAFT OBJETS.


juandayz

Recommended Posts

  • 4 weeks later...
On 2/1/2017 at 8: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

 

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...
9 minutes ago, NateDayZ said:

Hi, How do I put this on my server? Where do I put the script you made?

this is an example.. you can call it from fn_selfactions or with right click actions... what do you want to make with this?

Link to comment
Share on other sites

  • 1 month later...
  • 5 weeks later...
On 24/7/2017 at 1: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?

 

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

2 hours ago, 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"];
};

 

Thank you :)

Link to comment
Share on other sites

4 minutes ago, juandayz said:

please paste how do you do it. step by step

 

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

Just now, 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.

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

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
  • Discord

×
×
  • Create New...