-
Posts
2098 -
Joined
-
Last visited
-
Days Won
144
Content Type
Profiles
Forums
Articles
Posts posted by juandayz
-
-
Just now, DAmNRelentless said:
I'd love too, really but first reason I can't is that my windows is broke and I am currently reinstalling it. Currently I am still using it because Chrome still works while copying files on an external drive and second reason is that I am from Germany and brazil is quite far and my ping would screw myself up. xD
I would just rage because getting killed from somewhere 2 secconds delayed. :D
But thank you for the offer.ohh i was thinking brazil and germany is in the same continent.. Oceania.. ahha no just a joke America-Europe. Still remember 7-1. you know what im talking about.
-
Just now, DAmNRelentless said:
Heavily modifying it currently. This is a very nice idea and a good base to make an own gamemode which will not be epoch based. I have a hell of work to do but expect a huge update on this in the future. :)
in this moiment thers a brazilian server by wagner running it. if u wanna join we are playing now :D
-
Just now, kingpapawawa said:
did you intend for it to send 4 messages that the effect has worn off?
zombies are aware of you now
time out zeds are aware of you now
zombies are aware of you now
zombies are aware of you nowwalkamongsthedead.sqf
Spoilersand_endScript = {
systemChat ("Zombies are aware of you now"); //remove me
player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
player_zombieAttack = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieAttack.sqf';
DZE_hasZombieCamo = false;
hasGutsOnHim = false;
sand_washed = true;
sand_USEDGUTS = nil;
player removeAction s_player_cleanguts;
s_player_cleanguts = -1;
_control ctrlShow false;
//playSound "heartbeat_1";
}; -
Quote
Those 2 lines in red are needed together, It's been a while since I did that but you did need them both (I forget why) but they are not redundant here
i think are redundants same as here see:
if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!locked _cursorTarget} && {(_typeOfCursorTarget in DZE_UnLockedStorage)}
&& {player distance _cursorTarget < 5}) then {but, dont have doubts that the way you write it works.. anyway maybe you put it cuz you defined in the variables.sqf
DZE_MoneyStorageClasses = DZE_LockableStorage; and in default variables the two locked ids are defined:
DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"];
-
@ChrisRedfield well your fn_selfactions seems be fine.. are the same as provided by the mod. the only thing is this redundancy
if (_typeOfCursorTarget in DZE_MoneyStorageClasses && {!locked _cursorTarget} && {!(_typeOfCursorTarget in DZE_LockedStorage)} && {player distance _cursorTarget < 5}) then {
in the lines in red youre cheking if is not a loked target and if the storage is not defined in variables.sqf as loked: DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"]; is the same in other way. But i think this works for the others guys.
but anyway your issue sounds like youre missing one of
player removeAction s_bank_dialog2;
s_bank_dialog2 = -1;in somewhere.
-
but if u still want do it with righ click actions then read it
or here you got another
-
Just now, samnotts said:
is that in @dayz_epoch or dayz_epoch_server files
you need create a extra_rc.hpp is not in pbo files. any way.. here you have another way.
create setview.sqf (put in mpmissions\your instance\setview\)
Spoiler_sv = 'setviewdistance %1;'; setview = [ ["SETVIEW MENU",true], ["SETVIEW>>", [], "#USER:SVD", -5, [["expression", ""]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; SVD = [ ["",true], ["250M", [2], "", -5, [["expression", format[_sv ,"250"]]], "1", "1"], ["500M", [3], "", -5, [["expression", format[_sv ,"500"]]], "1", "1"], ["750M", [4], "", -5, [["expression", format[_sv ,"750"]]], "1", "1"], ["1000M", [5], "", -5, [["expression", format[_sv ,"1000"]]], "1", "1"], ["1250M", [6], "", -5, [["expression", format[_sv ,"1250"]]], "1", "1"], ["1500M", [7], "", -5, [["expression", format[_sv ,"1500"]]], "1", "1"], ["1750M", [8], "", -5, [["expression", format[_sv ,"1750"]]], "1", "1"], ["2000M", [9], "", -5, [["expression", format[_sv ,"2000"]]], "1", "1"], ["2250M", [10], "", -5, [["expression", format[_sv ,"2250"]]], "1", "1"], ["2500M", [11], "", -5, [["expression", format[_sv ,"2500"]]], "1", "1"], ["", [-1], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; showCommandingMenu "#USER:setview";
2-Now you need a custom keyboard.sqf (If u have one skip it and proceed with step 3)
Spoileropen \@DayZ_Epoch\addons\dayz_code\compile\ and copy the keyboard.sqf into mpmissions\your instance\
3-YOu need a custom compiles.sqf .. im sure you have one... open it.
Spoilerfind this lines:
if (!isDedicated) then { diag_log "Loading custom client compiles";
and below paste:
DZ_KeyDown_EH = compile preprocessFileLineNumbers "keyboard.sqf";
4-Now open your new custom keyboard.sqf. at bottom but before the last "_handled" paste:
if (_dikCode == 0x3C) then {execVM "setview\setview.sqf";};//setview MENU F2
now go in game and press F2 to open the setview menu.
-
Just now, khalcifer said:
thx i try it after restart, i dont have test server:(
{12944,210,12766 the value 210 in sqm means the altitude of this sensor.. in sqf go at last this value 12944,12766,210
Others things to see.. im not 100% sure but i feel that you cannot use PVP AREA, should be PVPAREA.
and here:
a=450;b=450;
TRGDEFTRGDEF is defined at top of class sensors..
class Sensors { items=¿?¿?; #define TRGDEF a=100;b=100;activationBy="ANY";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};
then youre overwriting it to set your own ratio. a=450;b=450;
but below you call again TRGDEF.. so im not sure if this works.
should be
class Item15 { position[]={6723.59,0.00143862,2583.92}; TRGDEF a=450;b=450; name="PVPArea";
if u can paste your whole mission.sqm whould be much more easier help you. use pastebin.com to paste it
-
other thing that you can try is replace your sensor by this:
class Item15 { position[]={6723.59,0.00143862,2583.92}; a=400; b=400; activationBy="WEST"; repeating=1; interruptable=1; age="UNKNOWN"; name="PVPArea"; expCond="(vehicle player) in thislist;"; expActiv="PVPArea = [] execVM ""scripts\pvparea_enter.sqf"";"; expDesactiv="terminate PVPArea; [] execVM ""scripts\pvparea_leave.sqf"";"; class Effects { }; };
pvparea_enter.sqf (mpmissions\your instance\scripts\ )
Spoiler//pvparea_enter private ["_txt"]; _txt = "<br/><t size='0.7' color='#ea2828' align='center'>PVP AREA!</t>"; [_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText; canbuild = false; //other code if u want
pvparea_leave.sqf (mpmissions\your instance\scripts\ )
Spoilerprivate ["_txt"];
_txt = "<br/><t size='0.7' color='#eaa728' align='center'>LEAVING PVP AREA!</t>";
[_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;canbuild = true;
-
sqm files uses "reverse" coords. for example if u took your coords from a sqf file: 6723.59,0.00143862,2583.92
to put this coords in a sqm file lime mission.sqm you need change the pos of the coords by: 6723.59,2583.92, 0.00143862
If it is not your problem and the coords are right.. take a look on your class Item 15. If is your last sensor then take a look on the top of class sensor you should be have this:
class Sensors
{
items=16; -
ok a quick test. to see if is your fn_selfactions.sqf the problem.. gonna call it from keyboard.sqf so remove everything about walkingdead from fn_selfactions.sqf
open the smear_guts.sqf and change the whole code for it
Spoilerprivate ["_txt","_zedbody","_nearestplayers"]; _zbody = cursorTarget; _wasguted = _zbody getVariable["wasguted",false]; _setinfectRand= round(random 10); _SetchanceInf = 7; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { systemChat ("You cannot made it under combat");}; if (hasGutsOnHim) exitWith { systemChat ("already covered in zombie guts"); }; if (vehicle player != player) exitWith {systemChat ("You cannot made it in a vehicle");}; if (!isNull _zbody && {player distance _ent < 5}) then { if (!Alive _zbody && {(_zbody isKindOf "zZombie_base")}) then { if (!_wasguted) then { if (_setinfectRand < _SetchanceInf) then { r_player_infected = true; player setVariable["USEC_infected",true,true]; systemChat ("You was infected by the blood"); }; player playActionNow "Medic"; [player,"gut",0,false,10] call dayz_zombieSpeak; sand_USEDGUTS = true; sand_washed = false; hasGutsOnHim = true; _zbody setVariable["wasguted",true,true]; player setVariable ["USEC_inPain", true, true]; }; }; };
now in your custom keyboard.sqf at bottom but before the last "_handled" paste:
if (_dikCode == 0x14) then {execVM "zedutility\walkamongstthedead\smear_guts.sqf";};
Now go in game kill a zed.. im he and press T key.
-
Just now, Robert261171 said:
Yes Ive tried all of the above, Ive had this before with other scripts
ok.. are u changing the fn_selfactions that is called from this compiles?
dayz_code\init\compiles.sqf the one in dayz_code\compile\fn_selfactions.sqf
-
and other thing is arma2 have almost 8 years.. and thers arma3, epoch for arma3,,, is like battlefield 3 and battlefield4.. everybody plays on bf4.. and also i dont like play anymore dayz, dayz epoch.. found more funny writing that playing.
wtf really miss the bf3 jet
-
mmm @theduke i think in the being dayz was something like a psychological test that each one make to itself. How do I react to this situation? This was the beuty of this game. Remember a guy.. i was driving in the south cost.. balota,, kamenka, dsnt matter.. found a guy in the middle of the road.. .pleasee! pleasee my friend is dying .. pick up me... hes in zelenogorks!! pleasee .. pick up him.. When we come to zeleno.. 3 guys waiting for me (his friends.. shoot on me 1millons times and stole my car) .The most elaborate performance I saw to kill and steal.. then i saw.. wtf this game is amazing.. now compare this with a fresh spawn with $2.500.000 in the bank, one as50 in the and and in the back a rpg. Why you need stole, found drink, food? if u spawn with everything in the hand.
But youre right ..."So no matter what, you cant please everyone, and doesnt matter what you do or try, it'll never be 100% to everyones liking"... and yes they are like a wife hahaa here in argentina thers a phrase about it:
"Las mujeres son coma la gata flora , si se la pones gritan y si se la sacas lloran" = "Womans are like flora cat, If you put it she screams, and if you take it out, she cry".. same with players.
-
@Robert261171 gonna take a look. pleas edit your post and put the code into a spoiler or use pastebin to share largest codes.
Ok your selfactions seems be fine.. but just for be sure.. relocate the walkamongst dead code above of take clothes code...and give one test.
Are you testing it with a ItemKnife in your inventory? other thing can you paste your init.sqf and the path wheres located the selfactions that you paste above? please
-
Just now, Legacy10 said:
So I have a dedicate box through OVH, and after allowing all of the applications through windows firewall, using remote connection with the dedi IP I can connect to the server. Oddly enough, ONLY I can connect with remote connection to the dedi, while my friends can't connect which makes no sense. Any help is appreciated.
you have your ports opened?
-
@RazorFPS some quick checks.
Spoileryou put the dayz_code folder provided by salival in your mission root?
you put the scripts folder provided by salival in your mssion root?
you replace the files in dayz_server.pbo ?
server_handleSafeGear.sqf
//server_updateObject.sqf
// server_monitor.sqfyou replace your description.ext in mission root by the one provided here?
do you have exactly this line in init.sqf :
call compile preprocessFileLineNumbers "scripts\traders\server_traders.sqf";
in your configvariables.sqf do you have this value? DZE_ConfigTrader = true;
Spoilerare you using the fn_selfaction.sqf provided by this mod?
your bunch of code about it in fn_selfactions looks like this?
Spoiler// All Traders if (_isMan && {!(isPlayer _cursorTarget)} && {_typeOfCursorTarget in serverTraders} && {!_isPZombie}) then { if (s_player_parts_crtl < 0) then { _humanity = player getVariable ["humanity",0]; _traderMenu = call compile format["menu_%1;",_typeOfCursorTarget]; _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_LOW"; _humanity_logic = false; if ((_traderMenu select 2) == "friendly") then { _humanity_logic = (_humanity < -5000); }; if ((_traderMenu select 2) == "hostile") then { _low_high = localize "STR_EPOCH_ACTIONS_HUMANITY_HIGH"; _humanity_logic = (_humanity > -5000); }; if ((_traderMenu select 2) == "hero") then { _humanity_logic = (_humanity < 5000); }; if (_humanity_logic) then { _cancel = player addAction [format[localize "STR_EPOCH_ACTIONS_HUMANITY",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false]; s_player_parts set [count s_player_parts,_cancel]; } else { // Static Menu { _buy = player addAction [format["Trade %1 %2 for %3 %4",(_x select 3),(_x select 5),(_x select 2),(_x select 6)], "\z\addons\dayz_code\actions\trade_items_wo_db.sqf",[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4),(_x select 5),(_x select 6)], (_x select 7), true, true]; s_player_parts set [count s_player_parts,_buy]; } count (_traderMenu select 1); if (DZE_ConfigTrader) then { _buyV = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\AdvancedTrading\init.sqf",(_traderMenu select 0), 999, true, false]; s_player_parts set [count s_player_parts,_buyV]; } else { // Database menu _buy = player addAction [localize "STR_EPOCH_PLAYER_289", "\z\addons\dayz_code\actions\show_dialog.sqf",(_traderMenu select 0), 999, true, false]; s_player_parts set [count s_player_parts,_buy]; }; }; s_player_parts_crtl = 1; }; } else { {player removeAction _x} count s_player_parts;s_player_parts = []; s_player_parts_crtl = -1; };
-
-
@Helion4 i think is cuz they never play dayz mod vanilla... where you only have a tent to store your things and a unlockable vehicle... Hide this two between trees and wait 1 or 2 days to be stoled... then Fuck! my things :( and when you died.. spawns in prigo, kamenka,komarvo and start to run to 2hs to the Berezino or Zelenogorks market places--- to get a fkng map.... or Electro , Cherno firestations.. or balota airfield to get some nice stuff. (nice stuff means a bizzon or Ak),, Remeber when i meet dayz mod.. i just buy War-z.. Play it one time.. and be a pirate of arma2oa dayz for 1 year.. before buy the game :D and still love it. And still my hand shakes when i see another player... and this only happend me with dayz or epoch. no with others games.
-
they no only kills servers,, are killing the whole epoch arma2. its not only happening in 1 or 2 servers..
-
Just now, ziggah said:
The editor just seems really clunky and impractical. Plus when using it, most of the buildings and trees are gone, so I can't build bases on top of premade buildings (which is the meat and bone of DayZ in my opinion). Anyone know how to practice building?
One of my favourite things in games is base building. To be more specific, making shooting ports. Arrow slit like holes that make it impossible to kill you from a certain angle. They're really OP in games like Rust. The building system in Epoch is my absolute favourite, I'd play on empty servers just so I can dupe glitch in cinder blocks and shit and make epic bases (then never play on the server again). But I usually practice on sandbox servers in Rust, Is there anything similar in DayZ Epoch? I have no experience making my own servers, so that is out of the question.
maybe i cannot understand you as well about my bad english.. but if u are asking about expand the default buildings system of epoch.. yes is totally possible.
Also the arma2oa have hes editor3d.. where you can build custom places, cities.. or whatever your mind lets you and export to epoch.
Open the game and press Ctrl + E. (editor3d gonna be opened)
-
Just now, Thug said:
@juandayz In your first post you said you removed localhost and put 127.0.0.1 and it worked. I did the same and made no differents.
Thank you for the information. I have read that and made sure I installed the MS Visual C++. Also I updated the post with a pic to show what was installed.
Still the database will not run.
Thank you for your time. This one has stopped me in my track. Have been up all night trying to find out what is wrong.
oh yes,, i comment about truncate your player login , player data and character.. but after read the post that i link you,, and icomrade said the same.. so i remove it... anyway --- yes u need the latest visual c++ i had the same problem when i leave 1.0.5.1 and pass to 1.6.. install the visual c++ 2015 and server works.
YOu already try truncate your db?
post for you again the .bat
Spoiler@echo off :: MAKE SURE TO CHANGE THESE BEFORE STARTING THE SERVER! :: Directory Settings set MYSQLDIR=C:\xampp\mysql\bin //redirect to your mysql.exe :: Your Settings Here set MYSQLHOST=127.0.0.1 set MYSQLUSER=your user set MYSQLPASS= youruser pass SET MYSQLDB= your db name cls title Server Cleanup Started :start "%MYSQLDIR%\mysql.exe" -h %MYSQLHOST% --user=%MYSQLUSER% --password=%MYSQLPASS% --database=%MYSQLDB% --execute="truncate object_data;" "%MYSQLDIR%\mysql.exe" -h %MYSQLHOST% --user=%MYSQLUSER% --password=%MYSQLPASS% --database=%MYSQLDB% --execute="truncate character_data;" "%MYSQLDIR%\mysql.exe" -h %MYSQLHOST% --user=%MYSQLUSER% --password=%MYSQLPASS% --database=%MYSQLDB% --execute="truncate player_data;" "%MYSQLDIR%\mysql.exe" -h %MYSQLHOST% --user=%MYSQLUSER% --password=%MYSQLPASS% --database=%MYSQLDB% --execute="truncate player_login;" echo (%time%) Server Cleanup Complete exit
-
this guy seems have same error
-
admin building tool!!!!
in Scripting
Posted
i wrote it to let players build houses..but a quick change to do that you want:
you need a custom keyboard.sqf and you need put a key to call the sqf from below. ( assume you know how to do it)
example with "9" key.
if (_dikCode == 0x0A) then {[]execVM "yourpath\admbuildmenu.sqf";}; //#9 key
admbuildmenu.sqf (you can add more buildables if u want)
_admbuildpath = '["%1"] execVM "yourPATH\admbuild.sqf"'; ADMBUILDMENU = [ ["ADMMENU",true], ["BUILD>>", [],"#USER:buildmenu", -5,[["expression",""]],"1","1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; buildmenu = [ ["",true], [">BUILDS<", [], "", -5, [["expression", ""]], "1", "0"], ["WF", [], "", -5, [["expression", format[_admbuildpath,"WoodFloor_DZ"]]], "1", "1"], ["WSW", [], "", -5, [["expression", format[_admbuildpath,"WoodSmallWall_DZ"]]], "1", "1"], ["CW", [], "", -5, [["expression", format[_admbuildpath,"CinderWall_DZ"]]], "1", "1"], ["CWD", [], "", -5, [["expression", format[_admbuildpath,"CinderWallDoorway_DZ"]]], "1", "1"], ["PPOLE", [], "", -5, [["expression", format[_admbuildpath,"Plastic_Pole_EP1_DZ"]]], "1", "1"], ["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [13], "", -3, [["expression", ""]], "1", "1"] ]; showCommandingMenu "#USER:ADMBUILDMENU";
admbuild.sqf
// use only whit DZE_permanentplot=true; private ["_plotcheck","_cost","_coins","_playerPos","_nearRestr","_hastool","_hasitem","_removed","_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"]; //Check if building already in progress, exit if so. if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; dayz_actionInProgress = true; _pos = [player] call FNC_GetPos; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _vehicle = vehicle player; _inVehicle = (_vehicle != player); DZE_Q = false; DZE_Z = false; DZE_Q_alt = false; DZE_Z_alt = false; DZE_Q_ctrl = false; DZE_Z_ctrl = false; DZE_5 = false; DZE_4 = false; DZE_6 = false; DZE_F = false; DZE_cancelBuilding = false; DZE_updateVec = false; DZE_memDir = 0; DZE_memForBack = 0; DZE_memLeftRight = 0; call gear_ui_init; closeDialog 1; if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; //////////////////////////////PUT YOUR OBJET ID BELLOW _classname = _this select 0; /////////////////////////////////////////////// _classnametmp = _classname; _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview"); _lockable = 0; //default define if lockable not found in config file below if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then { //find out if item is lockable object _lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable"); // 2=lockbox, 3=combolock, 4=safe }; _isAllowedUnderGround = 1; //check if allowed to build under terrain if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then { _isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground"); }; _offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset"); if((count _offset) <= 0) then { _offset = [0,2,1]; }; _objectHelper = objNull; _isOk = true; _location1 = [player] call FNC_GetPos; // get inital players position _dir = getDir player; //required to pass direction when building // if ghost preview available use that instead if (_ghost != "") then { _classname = _ghost; }; _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built _objectHelper = "Sign_sphere10cm_EP1" createVehicle [0,0,0]; _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)"; _objectHelper setobjecttexture [0,_helperColor]; _objectHelper attachTo [player,_offset]; _object attachTo [_objectHelper,[0,0,0]]; if (isClass (configFile >> "SnapBuilding" >> _classname)) then { ["","","",["Init",_object,_classname,_objectHelper]] spawn snap_build; }; ["","","",["Init","Init",0]] spawn build_vectors; _objHDiff = 0; _cancel = false; _reason = ""; helperDetach = false; _canDo = (!r_drag_sqf and !r_player_unconscious); _position = [_objectHelper] call FNC_GetPos; while {_isOk} do { _zheightchanged = false; _zheightdirection = ""; _rotate = false; if (DZE_Q) then { DZE_Q = false; _zheightdirection = "up"; _zheightchanged = true; }; if (DZE_Z) then { DZE_Z = false; _zheightdirection = "down"; _zheightchanged = true; }; if (DZE_Q_alt) then { DZE_Q_alt = false; _zheightdirection = "up_alt"; _zheightchanged = true; }; if (DZE_Z_alt) then { DZE_Z_alt = false; _zheightdirection = "down_alt"; _zheightchanged = true; }; if (DZE_Q_ctrl) then { DZE_Q_ctrl = false; _zheightdirection = "up_ctrl"; _zheightchanged = true; }; if (DZE_Z_ctrl) then { DZE_Z_ctrl = false; _zheightdirection = "down_ctrl"; _zheightchanged = true; }; if (DZE_4) then { _rotate = true; DZE_4 = false; if(DZE_dirWithDegrees) then{ DZE_memDir = DZE_memDir - DZE_curDegree; }else{ DZE_memDir = DZE_memDir - 45; }; }; if (DZE_6) then { _rotate = true; DZE_6 = false; if(DZE_dirWithDegrees) then{ DZE_memDir = DZE_memDir + DZE_curDegree; }else{ DZE_memDir = DZE_memDir + 45; }; }; if(DZE_updateVec) then{ [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; DZE_updateVec = false; }; if (DZE_F and _canDo) then { if (helperDetach) then { _objectHelper attachTo [player]; DZE_memDir = DZE_memDir-(getDir player); helperDetach = false; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; } else { _objectHelperPos = getPosATL _objectHelper; detach _objectHelper; DZE_memDir = getDir _objectHelper; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; _objectHelper setPosATL _objectHelperPos; _objectHelper setVelocity [0,0,0]; //fix sliding glitch helperDetach = true; }; DZE_F = false; }; if(_rotate) then { [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; }; if(_zheightchanged) then { if (!helperDetach) then { detach _objectHelper; _objectHelperDir = getDir _objectHelper; }; _position = [_objectHelper] call FNC_GetPos; if(_zheightdirection == "up") then { _position set [2,((_position select 2)+0.1)]; _objHDiff = _objHDiff + 0.1; }; if(_zheightdirection == "down") then { _position set [2,((_position select 2)-0.1)]; _objHDiff = _objHDiff - 0.1; }; if(_zheightdirection == "up_alt") then { _position set [2,((_position select 2)+1)]; _objHDiff = _objHDiff + 1; }; if(_zheightdirection == "down_alt") then { _position set [2,((_position select 2)-1)]; _objHDiff = _objHDiff - 1; }; if(_zheightdirection == "up_ctrl") then { _position set [2,((_position select 2)+0.01)]; _objHDiff = _objHDiff + 0.01; }; if(_zheightdirection == "down_ctrl") then { _position set [2,((_position select 2)-0.01)]; _objHDiff = _objHDiff - 0.01; }; if((_isAllowedUnderGround == 0) && ((_position select 2) < 0)) then { _position set [2,0]; }; if (surfaceIsWater _position) then { _objectHelper setPosASL _position; } else { _objectHelper setPosATL _position; }; if (!helperDetach) then { _objectHelper attachTo [player]; }; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; }; uiSleep 0.5; _location2 = [player] call FNC_GetPos; _objectHelperPos = [_objectHelper] call FNC_GetPos; if(DZE_5) exitWith { _isOk = false; _position = [_object] call FNC_GetPos; detach _object; _dir = getDir _object; _vector = [(vectorDir _object),(vectorUp _object)]; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _location2 > 25) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_MOVED",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _objectHelperPos > 25) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_TOO_FAR",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(abs(_objHDiff) > DZE_buildMaxHeightDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_HEIGHT",DZE_buildMaxHeightDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false; _cancel = true; _reason = localize "str_epoch_player_43"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (DZE_cancelBuilding) exitWith { _isOk = false; _cancel = true; _reason = localize "STR_EPOCH_PLAYER_46"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; }; _isOk = true; _proceed = false; _counter = 0; _location = [0,0,0]; //No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD"; }; }; // No building in trader zones if(!canbuild) then { _cancel = true; _reason = format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"]; }; if(!_cancel) then { _classname = _classnametmp; // Start Build _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; //create actual object that will be published to database _tmpbuilt setdir _dir; //set direction inherited from passed args from control _tmpbuilt setVariable["memDir",_dir,true]; // Get position based on object _location = _position; if((_isAllowedUnderGround == 0) && ((_location select 2) < 0)) then { //check Z axis if not allowed to build underground _location set [2,0]; //reset Z axis to zero (above terrain) }; _tmpbuilt setVectorDirAndUp _vector; _buildOffset = [0,0,0]; _vUp = _vector select 1; switch (_classname) do { case "MetalFloor_DZ": { _buildOffset = [(_vUp select 0) * .148, (_vUp select 1) * .148,0]; }; }; _location = [ (_location select 0) - (_buildOffset select 0), (_location select 1) - (_buildOffset select 1), (_location select 2) - (_buildOffset select 2) ]; if (surfaceIsWater _location) then { _tmpbuilt setPosASL _location; _location = ASLtoATL _location; //Database uses ATL } else { _tmpbuilt setPosATL _location; }; format[localize "str_epoch_player_138",_text] call dayz_rollingMessages; //////////////////////////////////////////////////##########START TO BUILD AND REMOVE OBJETS player playActionNow "Medic"; [player,"repair",0,false,10] call dayz_zombieSpeak; [player,10,true,(getPosATL player)] spawn player_alertZombies; sleep 3; //////////////////////////////////////////////////////////////////////////////// _limit = 3; //times it takes to build by default if (DZE_StaticConstructionCount > 0) then { //if count is manually overridden inside init.sqf, use that instead, else use limits configured in config files _limit = DZE_StaticConstructionCount; } else { if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount"); }; }; _tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable //if not lockable item _tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true]; _friendsArr = [[dayz_playerUID,toArray (name player)]]; _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr]; publicVariableServer "PVDZ_obj_Publish"; }; } else { //if magazine was not removed, cancel publish deleteVehicle _tmpbuilt; localize "str_epoch_player_46" call dayz_rollingMessages; }; //by juandayz writed with base on modular_build.sqf dayz_actionInProgress = false;