reactortrip
Member
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:
below that add one of these two:
This allows everyone to burn tents.
or
This allows only certain players/admins, put your guid in the xxxxxxxxx
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
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