Jump to content
Sign in to follow this  
juandayz

SCRIPT BASE TO CRAFT OBJETS.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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"];
};

 

Share this post


Link to post
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 :)

Share this post


Link to post
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.

Share this post


Link to post
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",""];

Share this post


Link to post
Share on other sites

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.

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...
Sign in to follow this  

  • Similar Content

    • By mgm
      PROJECT ON HOLD - TO BE RESUMED ONE DAY...
       
      source code is here: https://gitlab.com/themgm/transport_for_arma
       
       
      TRANSPORT FOR ARMA
       
      INTRODUCTION
      This script bring the following functionality:
      [READY] Players can call an AI piloted land vehicle TaxiAnywhere and request it to take you to a point on map which YOU CHOOSE BY CLICKING ON MAP.
      Upon reaching destination AI-controlled-taxi-vehicle will stop and you can disembark. The taxi will then ride away and despawn away from player (for immersion).
        [READY] Players can call an AI piloted land vehicle FixedDestinationTaxi and request it to take you to ONE OF THE FEW PRE-CHOSEN (by ServerAdmin) points on map.
      Upon reaching destination AI-controlled-taxi-vehicle will stop and you can disembark. The taxi will then ride away and despawn away from player (for immersion).
        [WIP] Players can embark an AI piloted land vehicle PublicBus and it will automatically drive on its PRE-CHOSEN BUS ROUTE (by ServerAdmin).
      When a player wish to disembark, they can request a STOP-VEHICLE via the TfA-GUI & allow them to disembark. The bus will then ride away and carry on looping its route.
      PAYMENT SYSTEM NOTES
      Taxi Anywhere Taxis    :    Initial Booking Fee + 1st Mile Fee + Pay-as-you-Go Fee    -- ServerAdmin can customize or disable any of the fees. Fixed Destination Taxis    :    'Single Fee'             -- Fee is calculated on the fly according to a pricing mechanism. ServerAdmin can customize or disable this fee. Public Buses        :    'Single Fee'            -- ServerAdmin can customize/disable the fee on any/all BusRoutes.  
      LICENSE
      GNU GPL v3. You can do whatever you want with this mod as long as you give the same freedom to others on your derivative works.
       
      DOWNLOAD
      29 Jan 2017 - git repo is gone. direct link to the last package (v.0.6.5b2 from 18th May 2016) http://www.filedropper.com/mgmtfav065build2
      18th May 2016 - New version v.0.6.5b2 available!
      Release package direct link to 7zip archive file: https://gitlab.com/themgm/Transport_for_Arma/blob/master/release_packages/_autogenerated/v.0.6.5.build2/mgmTfA_v.0.6.5.build2.7z
      Installation Instructions: https://gitlab.com/themgm/Transport_for_Arma/blob/master/documentation/INSTALLATION_INSTRUCTIONS.txt
      Link to release directory where you can download the three additional files to verify integrity: https://gitlab.com/themgm/Transport_for_Arma/tree/master/release_packages/_autogenerated/v.0.6.5.build2
      If you try this script, please let me know what you think :)
       
       
      FEEDBACK / SUGGESTIONS / BUG REPORTS / SUPPORT
      Please post in this thread.

       
      See it in action! Click below to go to post #2 - VIDEOS
       
       
      last edit:
      21 Jan 21 - added source code URL (find it in the 1st post)
      29 Jan 17 - added latest version link & clarified project status.
    • By tyrant50187
      Im looking for the ability to add Script allowing Eyescan (retina scan) For Safe's and lockboxes, ether or, its something i havent found any script for but have found mentions and seen, any suggestions, links, or scripts are welcome, please Let me know!
    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By randall421
      The loot spawning on my server will respawn or cycle right infrnt of you if you move more than 5m away or if someone else near you moves 5ft away. I check player_spawncheck.sqf and it looks fine. 
      player_spawncheck.sqf 
      //player_spawncheck.sqf private ["_isWreck","_maxControlledZombies","_looted","_zombied","_doNothing","_spawnZedRadius","_serverTime","_age","_nearbyBuildings","_position","_speed","_radius","_maxlocalspawned","_maxWeaponHolders","_currentWeaponHolders","_maxtoCreate","_inVehicle","_isAir","_isLand","_isSea","_Controlledzeddivided","_totalcrew","_nearby","_type","_config","_canSpawn","_dis","_checkLoot","_islocal","_bPos","_zombiesNum"]; _age = -1; //_nearbyBuildings = []; _position = [player] call fnc_getPos; _speed = speed (vehicle player); _radius = 200; //150*0.707; Pointless Processing (106.5) _spawnZedRadius = 20; /* //Tick Time PVDZ_getTickTime = player; publicVariableServer "PVDZ_getTickTime"; */ //Total Counts _maxlocalspawned = round(dayz_spawnZombies); _maxControlledZombies = round(dayz_maxLocalZombies); _maxWeaponHolders = round(dayz_maxMaxWeaponHolders); _currentWeaponHolders = round(dayz_currentWeaponHolders); //Limits (Land,Sea,Air) _inVehicle = (vehicle player != player); /* _isAir = vehicle player iskindof "Air"; _isLand = vehicle player iskindof "Land"; _isSea = vehicle player iskindof "Sea"; if (_isLand) then { } else { }; if (_isAir) then { } else { }; if (_isSea) then { } else { }; */ _doNothing = false; if (_inVehicle) then { _Controlledzeddivided = 0; //exit if too fast if (_speed > 25) exitwith {_doNothing = true;}; //Crew can spawn zeds. _totalcrew = count (crew (vehicle player)); if (_totalcrew > 1) then { _Controlledzeddivided = 2; //Dont allow driver to spawn if we have other crew members. if (player == driver (vehicle player)) exitwith {_doNothing = true;}; } else { _Controlledzeddivided = 4; }; if (_Controlledzeddivided > 0) then { _maxControlledZombies = round(_maxControlledZombies / _Controlledzeddivided); r_player_divideinvehicle = _Controlledzeddivided; }; }; if (_doNothing) exitwith {}; /*if ("ItemMap_Debug" in items player) then { deleteMarkerLocal "MaxZeds"; deleteMarkerLocal "Counter"; deleteMarkerLocal "Loot30"; deleteMarkerLocal "Loot120"; deleteMarkerLocal "Agro80"; _markerstr = createMarkerLocal ["MaxZeds", _position]; _markerstr setMarkerColorLocal "ColorYellow"; _markerstr setMarkerShapeLocal "ELLIPSE"; _markerstr setMarkerBrushLocal "Border"; _markerstr setMarkerSizeLocal [_radius, _radius]; _markerstr1 = createMarkerLocal ["Counter", _position]; _markerstr1 setMarkerColorLocal "ColorRed"; _markerstr1 setMarkerShapeLocal "ELLIPSE"; _markerstr1 setMarkerBrushLocal "Border"; _markerstr1 setMarkerSizeLocal [_radius+100, _radius+100]; _markerstr2 = createMarkerLocal ["Agro80", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [80, 80]; _markerstr2 = createMarkerLocal ["Loot30", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [30, 30]; _markerstr3 = createMarkerLocal ["Loot120", _position]; _markerstr3 setMarkerColorLocal "ColorBlue"; _markerstr3 setMarkerShapeLocal "ELLIPSE"; _markerstr3 setMarkerBrushLocal "Border"; _markerstr3 setMarkerSizeLocal [120, 120]; diag_log ("LocalZombies: " +str(dayz_spawnZombies) + "/" +str(dayz_maxLocalZombies)); //Logging diag_log (format["%1 Local.Agents: %2/%3, NearBy.Agents: %8/%9, Global.Agents: %6/%7, W.holders: %10/%11, (radius:%4m %5fps).","SpawnCheck", _maxlocalspawned, _maxControlledZombies, _radius, round diag_fpsmin,dayz_currentGlobalZombies, dayz_maxGlobalZeds, dayz_CurrentNearByZombies, dayz_maxNearByZombies, _currentWeaponHolders,_maxWeaponHolders]); };*/ // nearObjects is faster than nearestObjects when sorting by distance isn't needed // "Building" includes House and all of its child classes (Crashsite, IC_Fireplace1, IC_Tent, etc.) _nearby = _position nearObjects ["Building",_radius]; _maxlocalspawned = _maxlocalspawned max floor(_maxControlledZombies*.8); if (_maxlocalspawned > 0) then { _spawnZedRadius = _spawnZedRadius * 3; }; //Spawn Zeds & loot in buildings { _type = typeOf _x; _config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type; _canSpawn = isClass (_config); if (_canSpawn) then { _dis = _x distance player; _checkLoot = (count (getArray (_config >> "lootPos"))) > 0; _islocal = _x getVariable ["", false]; // object created locally via TownGenerator. //Make sure wrecks always spawn Zeds _isWreck = _x isKindOf "CrashSite"; //Loot if (getNumber(_config >> "lootChance") > 0) then { if (_currentWeaponHolders < _maxWeaponHolders) then { //Basic loot check if ((_dis < 125) and (_dis > 30) and !_inVehicle and _checkLoot) then { _serverTime = serverTime; _looted = (_x getVariable ["looted",_serverTime]); _age = _serverTime - _looted; //Building refresh rate if (_age == 0 or (_age > getNumber(_config >> "lootRefreshTimer"))) then { _x setVariable ["looted",_serverTime,!_islocal]; _x call building_spawnLoot; if (!(_x in dayz_buildingBubbleMonitor)) then { dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //diag_log [ diag_tickTime, "new loot at",_x,"age:", _age, "serverTime:", _serverTime]; }/* else { diag_log [ diag_tickTime, "won't spawn loot at",_x,"age:", _age, "serverTime:", _serverTime]; }*/; }; }; }; //Zeds if (getNumber(_config >> "zombieChance") > 0) then { if (_dis > _spawnZedRadius) then { _serverTime = serverTime; _zombied = (_x getVariable ["zombieSpawn",_serverTime]); _age = _serverTime - _zombied; if ((_age == 0) or (_age > 300)) then { if (!_isWreck) then { if ((dayz_spawnZombies < _maxControlledZombies) and (dayz_CurrentNearByZombies < dayz_maxNearByZombies) and (dayz_currentGlobalZombies < dayz_maxGlobalZeds)) then { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]); if (_zombiesNum == 0) then { _x setVariable ["zombieSpawn",_serverTime,!_islocal]; if (!(_x in dayz_buildingBubbleMonitor)) then { //add active zed to var dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //start spawn [_x] call building_spawnZombies; }; //diag_log (format["%1 building. %2", __FILE__, _x]); }; } else { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 30)]); //Should be a wreck if (_zombiesNum == 0) then { [_x,_isWreck] call building_spawnZombies; }; }; }; }; }; }; } forEach _nearby; At first I thought it was a respawn timer issue or something like that but if you don't move the loot will stay, you have to back away from it or someone else has to get within range and its not like you have to run away for this to happen, you can just back up a few steps and watch the loot change right infront of you. I have been playing around with it just trying to see if i can figure it out but if anyone knows what i should do or can at least point me in the right direction it would be a huge help.
       
      Thanks
    • By calinova22
      I was wondering if it is possible to make it so that a players humanity would not change for a certain amount of time? I have a PVP arena with a teleport in and I was wanting to make it so people could TP in and fight without worrying about gaining or losing humanity.
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...