Tent Igniting for Everyone or Just Admins

This is stolen from another mod, can't remember which had it. This is not my work. I know it's on Breaking Point, but I think they stole it from 2017 or Epoch. This sets a tent on fire and erases it from the database so you can finally remove those annoying tents from your server.

first thing you got to do is get your compiles in your mission PBO if you haven't done that. In your init.sqf change the compiles line to something like this:

call compile preprocessFileLineNumbers "Fixes\compiles.sqf"; //Compile regular functions

Make sure to get your compiles.sqf from you dayz_code pbo and put it in a folder called Fixes inside your mission PBO.

In your compiles.sqf file, you need to do something similar as you did above to get your fn_selfActions.sqf in your mission PBO.

fnc_usec_selfActions = compile preprocessFileLineNumbers "Fixes\fn_selfActions.sqf"; //Checks which actions for self

fn_selfactions.sqf should be in your dayz_code PBO and needs to be moved into the Fixes folder in your Mission PBO once you make the below changes in it.

fn_selfactions.sqf edits:

Around line 28 you should have
_hasKnife = "ItemKnife" in items player;

right below that add:
_hasMatches = "ItemMatchbox" in items player;

find:

Code:
    if(cursorTarget == dayz_hasFire and _canDo) then {
        if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
            s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
        };
    } else {
        player removeAction s_player_fireout;
        s_player_fireout = -1;
    };

below that add one of these two:

This allows everyone to burn tents.
Code:
    //Allow player to set tent on fire
    if(_isTent and _hasMatches and _canDo and !_isMan) then {
        if (s_player_igniteTent < 0) then {
            s_player_igniteTent = player addAction [format["Ignite Tent"], "Fixes\tent_ignite.sqf",cursorTarget, 1, true, true, "", ""];
        };
    } else {
        player removeAction s_player_igniteTent;
        s_player_igniteTent = -1;
    };

or

This allows only certain players/admins, put your guid in the xxxxxxxxx
Code:
    //Allow player to set tent on fire
    if(_isTent and _hasMatches and _canDo and !_isMan and ((getPlayerUID player) in ["xxxxxxxxx","xxxxxxxxx"])) then {
        if (s_player_igniteTent < 0) then {
            s_player_igniteTent = player addAction [format["Ignite Tent"], "Fixes\tent_ignite.sqf",cursorTarget, 1, true, true, "", ""];
        };
    } else {
        player removeAction s_player_igniteTent;
        s_player_igniteTent = -1;
    };

Next Find:
player removeAction s_player_sleep;
s_player_sleep = -1;

Below that add:
player removeAction s_player_igniteTent;
s_player_igniteTent = -1;

Next create a .sqf called tent_ignite.sqf from this code and put it in the fixes folder:
http://pastebin.com/sFVdZk6c

all done, enjoy burning tents
 
You also can just disable characteridcheck in fn_selfactions.sqf where the Script for packtent is. Then you can Pack every tent.
 
I added the ignite tent and tested it only to find out that the DB was not ever changed and they restored on restart. Sometimes with inventory and sometimes without. Then I moved onto the packtent option as NeverUsedID suggested and it yelled that I could not pack the tent since I was not the owner and the action continued as it was packing the tent.

Any other suggestions I can try??
 
This is my solution:
http://opendayz.net/threads/take-ownership-of-a-tent.9829/page-2#post-49713

You will get a new option where you can take ownership of the tent. After that you can pack it. Another good thing: on some server a the tent gets deleted if the owner is dead for some days. With this method the tent will stay alive.

you can just remove the serverside code (anything from:

Code:
//set owner on sqlserver (it use a publicvariable in publicEH.sqf:
)
and the database will not get touched. But you can pack the tent.
 
I added the ignite tent and tested it only to find out that the DB was not ever changed and they restored on restart. Sometimes with inventory and sometimes without. Then I moved onto the packtent option as NeverUsedID suggested and it yelled that I could not pack the tent since I was not the owner and the action continued as it was packing the tent.

Any other suggestions I can try??

Weird, I have a dayz.st server and they disappear on restart.
 
Ok i managed to get the option ignite tent show up but i get kicked for battleye public variable restriction #0 any ideas?

I looked in the public variable.txt but this is all it contains:

Code:
5 !="remExField" !="remExFP" !="drn_AskServerDynamicWeatherEventArgs" !="BIS_effects_gepv" !"PVDZ_" !"SRVFACO4567"
 
////////////////////////// From server only: Broadcast PV without EH (no code executed on change)
5="drn_var_DynamicWeather_rain" 
5="drn_var_DynamicWeather_ServerInitialized" 
 
////////////////////////// Broadcast PV with EH
//1="PVDZ_obj_Fire"
1="PVDZ_obj_GutBody"
1="PVDZ_obj_HideBody"
1="PVDZ_plr_Humanity"
//1="PVDZ_obj_RoadFlare"
//1="drn_AskServerDynamicWeatherEventArgs"
//1="PVDZ_drg_RaDrag"
//1="PVDZ_drg_RaLW"
//1="PVDZ_drg_RLact"
//1="PVDZ_hlt_Bandage"
//1="PVDZ_hlt_Bleed"
//1="PVDZ_hlt_Epi"
//1="PVDZ_hlt_Morphine"
//1="PVDZ_hlt_PainK"
//1="PVDZ_hlt_Transfuse"
//1="BIS_effects_gepv"
1="PVDZ_veh_SetFuel"
1="PVDZ_veh_SH"
1="PVDZ_veh_SF"
 
////////////////////////// From server only: Broadcast PV with EH
5="dayzInfectedCamps"
5="dayzSetDate"
5="drn_DynamicWeather_DebugTextEventArgs"
5="drn_DynamicWeatherEventArgs"
 
 
////////////////////////// Unicast PV ->Server
//1="PVDZ_sec_atp"
//1="PVDZ_plr_Save"
//1="PVDZ_veh_Save"
1="PVDZ_obj_Delete"
1="PVDZ_plr_Death"
1="PVDZ_plr_LoginRecord"
1="PVDZ_obj_Publish"
//1="PVDZ_plr_Login1"
//1="PVDZ_plr_Login2"
 
////////////////////////// Unicast PV Client<-
5="dayzPlayerLogin2"
5="dayzPlayerLogin"
 
////////////////////////// BIS libs
//1="remExField"
//1="remExFP"
 
so what does the logfile say why you got kicked?...
i know... reading logfiles is for old women... but just get over it and do it... ^^
 
This the error i got when i try to ignite the tent and kicked


Code:
16:11:46 Error in expression <layerObj getVariable["combattimeout",0] - time;
diag_log format["Player UID#%1 C>
16:11:46  Error position: <- time;
diag_log format["Player UID#%1 C>
16:11:46  Error Generic error in expression
16:11:46 File z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf, line 21
16:11:46 Error in expression <layerObj getVariable["combattimeout",0] - time;
diag_log format["Player UID#%1 C>
16:11:46  Error position: <- time;
diag_log format["Player UID#%1 C>
16:11:46  Error Generic error in expression
16:11:46 File z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf, line 21
16:11:46 Client: Remote object 3:9 not found
 
Can anyone help me as to what i can change to stop getting kicked for battleye public variable restriction #0 and it has now started showing up as set damage #1 with the same errors in the RPT
 
with checking the logfile i meant the logfile regarding to the kickmessage... o_O


The setDamage Log file has the following:

Code:
20.06.2013 21:01:33: Did (82.**********) c72***************************** - #0 2.000000 2:1381 TentStorage
20.06.2013 21:01:33: Did (82.*********) c72***************************** - #1 2.000000 2:1381 TentStorage
 
so you wrote the kickmessage was public variable restriction #0
then the right logfile should be publicvariable.log or publicvariableval.log...
 
Ok so finally got it working but like Excelsior says the tent does not delete and re appears with loot on restart.
 
so you wrote the kickmessage was public variable restriction #0
then the right logfile should be publicvariable.log or publicvariableval.log...


I did say that yes but then I also said it started showing up as set damage #1 instead
 
whats the first few rows of your setdamage kick file look like

There is only 2 rows, it looked like this

1
5 #0.00000 I just changed the 5 to 1

Sorry I'm currently not at the conputer now so can't get it to you exactly, do you know of any reason why the tents don't delete from the database?

Thanks
 
There is only 2 rows, it looked like this

1
5 #0.00000 I just changed the 5 to 1

Sorry I'm currently not at the conputer now so can't get it to you exactly, do you know of any reason why the tents don't delete from the database?

Thanks

works fine on my dayz.st server running 1.7.7.1, so i dont know.
 
Back
Top