Tents problem

Mr.Weegley

Member
Hi, Guru's :)
Can anybody help with strange behaviour of tents?
Problem: When you press "Pitch tent", or how it's named in english (i have russian version), the tent appears on ground, but it's not actually set. It countiniously follows in front of player, without any possibility to fix it on ground. It looks like, i think, in editor, when you want to place something. Any action, e.g. click, press buttons or whatever do not have any effect. And it's not possible to pack it back. Player have to disconnect to get rid of this tent. After this, tent stays where it was before disconnect, but it's not saved to DB (of cource, it was not set properly) and lost after restart.
I'll try to make video of this a bit later.
Any ideas?

PS, i have Blur antihack installed(it caused self_blood etc. to not work untill i realized that)
 
Last edited:
dol you have the latest version of the antihack? v0318E
these problems should be solved already... also with some older versions...
 
no, i have this one
I can't pay 50 euros for antihack tool on server which does not make anything for me exept of moral pleasure :)
And found that this problem is caused exactly by antihack.
Added _actionBuild,_actionCancel to exclusions, but it did not help yet. May be there some other actions used to pitch tents which needs to be whitelisted..

upd
Trying to debug that bloody antihack... It's kinda strange.
Also, i believe that this antihack disables crafting system on my server.
 
Last edited:
so then please post it right away....

the sense of a forum is that one posts a problem and many can read and answer...

this is a forum... and not the yellow pages... :cool:
 
OK :)
So, I faced that problem, and answer is below.

Tents pitching IS NOT maintained by dayz_code.pbo/Actions/tent_pitch.sqf, like it stated in dayz_code.pbo/init/compiles.sqf
It maintained by dayz_code.pbo/actions/player_build.sqf. There are PRIVATE actions _actionBuild and _actionCancel inside:

dayz_code.pbo/actions/player_build.sqf, line #1
Code:
private ["_item","_classname","_require","_text","_location","_sfx","_object","_string","_onLadder","_isWater","_boundingBox","_maxPoint","_actionBuild","_actionCancel"];

BUT

I have blurgaming Antihack public release, which can be found here. And it removes ALL menu items from mouse wheel down menu, which it can not recognize. Off cource, it can not recognize these actions, even if you try to whitelist these names in codefree.sqf, because of the variable scope.
So, solution is to make these variables global.
1. Copy next files into mission folder:
  • compiles.sqf
  • variables.sqf
  • player_build.sqf
  • tent_pitch.sqf - this one is not really necessary, you may skip it.
Next part assumes that you put files to have directory as follows:
Code:
dayz_1.Chernarus
      |__custom
               |___code
               |     |__compiles.sqf
               |     |__variables.sqf
               |___scripts
                        |__ player_build.sqf
                        |__tent_pitch.sqf

In compiles.sqf replace:
Code:
player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf";
With:
Code:
player_build = compile preprocessFileLineNumbers "scripts\player_build.sqf";

In player_build.sqf replace:
1.
Code:
private ["_item","_classname","_require","_text","_location","_sfx","_object","_string","_onLadder","_isWater","_boundingBox","_maxPoint","_actionBuild","_actionCancel"];
With:
Code:
private ["_item","_classname","_require","_text","_location","_sfx","_object","_string","_onLadder","_isWater","_boundingBox","_maxPoint"];

2.
Code:
_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, true, 20, _sfx], 1, true, true, "", "!isNull (_target getVariable [""constructionObject"", objNull])"];
_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, false, 0, "none"], 1, true, true, "", "!isNull (_target getVariable [""constructionObject"", objNull])"];
With:
Code:
s_player_actionBuild = player addAction [localize "str_player_build_complete", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, true, 20, _sfx], 1, true, true, "", "!isNull (_target getVariable [""constructionObject"", objNull])"];
s_player_actionCancel = player addAction [localize "str_player_build_cancel", "\z\addons\dayz_code\actions\object_build.sqf", [_object, _item, _classname, _text, false, 0, "none"], 1, true, true, "", "!isNull (_target getVariable [""constructionObject"", objNull])"];

3.
Code:
player removeAction _actionBuild;
player removeAction _actionCancel;
With:
Code:
player removeAction s_player_actionBuild;
s_player_actionBuild = -1;
player removeAction s_player_actionCancel;
s_player_actionCancel = -1;

In Variables.sqf around line 268 there are bunch of lines like s_player_gather = -1;
Insert after last of it:
Code:
    s_player_actionBuild = -1;
    s_player_actionCancel = -1;

And finally, Whitelist these actions in antihack.
Codefree.sqf, approx. line #318:
Code:
_dayzActions = (s_player_repairActions + r_player_actions2 + r_player_actions +
                [s_player_holderPickup,s_player_fillfuel5,s_player_fillfuel20,s_player_grabflare,s_player_removeflare,s_player_deleteBuild,s_player_forceSave,s_player_flipveh,s_player_fillfuel.........

Insert new actions after first "[":
Code:
_dayzActions = (s_player_repairActions + r_player_actions2 + r_player_actions +
                [s_player_actionBuild,s_player_actionCancel,s_player_holderPickup,s_player_fillfuel5,s_player_fillfuel20,s_player_grabflare,s_player_removeflare,s_player_deleteBuild,s_player_forceSave,
                s_player_flipveh,s_player_fillfuel.......

Now, pack your antihack back to dayz_server.pbo, pack mission, if you pack it, and you should see correct menu items about finishing and cancelling building tent.


PS
Now i'm trying to find out how to enable default crafting system back, because it is also blocked by this antihack. But it's a bit different from actions - antihack removes the crafting window, and i can't find how to fix it yet.
 
Back
Top