Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
We did it in 2017 first. All the code is in my repo. I am little bit busy to do a how too, but you can ask questions if you get stuck and I will do my best to answer:
https://github.com/shinkicker/DayZ-2017-Main
Do you think it could be made possible to eat the flesh of NPC's too?
_isMan = cursorTarget isKindOf "Man";
_isRealMan = cursorTarget isKindOf "CAManBase";
_isAnimal = cursorTarget isKindOf "Animal";
_isZombie = cursorTarget isKindOf "zZombie_base";
if (_isMan and !_isAlive and !_isZombie and !_isAnimal and _hasKnife and !_isHarvested and _canDo) then {
if (s_player_gather_human_butcher < 0) then {
s_player_gather_human_butcher = player addAction [localize "str_actions_self_11", "\z\addons\dayz_code\actions\gather_human_meat.sqf",cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_gather_human_butcher;
s_player_gather_human_butcher = -1;
};
// Gut Human - By Knobbin.
if (!_isAlive and !_isZombie and !_isAnimal and !_isHarvested and _isMan and _hasKnife and _canDo) then {
if (s_player_butcher_human < 0) then {
s_player_butcher_human = player addAction [format["<t color='#42426F'>Gut Human%1</t>"], "fixes\gather_meat_human.sqf",cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_butcher_human;
s_player_butcher_human = -1;
};
// Gut Zombie - By Knobbin.
if (!_isAlive and !_isAnimal and !_isHarvested and _isZombie and _hasKnife and _canDo) then {
if (s_player_butcher_zombie < 0) then {
s_player_butcher_zombie = player addAction [format["<t color='#42426F'>Gut Zombie%1</t>"], "fixes\gather_meat_zombie.sqf",cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_butcher_zombie;
s_player_butcher_zombie = -1;
};
if (_isMan and !_isAlive and !_isZombie) then {
if (s_player_studybody < 0) then {
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studybody;
s_player_studybody = -1;
};
} else {
//Gut Human
player removeAction s_player_butcher_human;
s_player_butcher_human = -1;
//Gut Zombie
player removeAction s_player_butcher_zombie;
s_player_butcher_zombie = -1;
fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";
call compile preprocessFileLineNumbers "fixes\variables.sqf";
s_player_butcher_human = -1;
s_player_butcher_zombie = -1;
Put these 3 files in your mission pbo (usually in a fixes folder or something like that)
https://www.dropbox.com/s/hkpirzynmhxkdv4/gather_meat_human.sqf
https://www.dropbox.com/s/3pv577tudbr409r/gather_meat_zombie.sqf
https://www.dropbox.com/s/gej9kik17tvlofe/gather_meat.sqf
In your fn_selfActions.sqf file you need to add the following code after the entire //Repairing Vehicles section.
Code:// Gut Human - By Knobbin. if (!_isAlive and !_isZombie and !_isAnimal and !_isHarvested and _isMan and _hasKnife and _canDo) then { if (s_player_butcher_human < 0) then { s_player_butcher_human = player addAction [format["<t color='#42426F'>Gut Human%1</t>"], "fixes\gather_meat_human.sqf",cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_player_butcher_human; s_player_butcher_human = -1; }; // Gut Zombie - By Knobbin. if (!_isAlive and !_isAnimal and !_isHarvested and _isZombie and _hasKnife and _canDo) then { if (s_player_butcher_zombie < 0) then { s_player_butcher_zombie = player addAction [format["<t color='#42426F'>Gut Zombie%1</t>"], "fixes\gather_meat_zombie.sqf",cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_player_butcher_zombie; s_player_butcher_zombie = -1; }; if (_isMan and !_isAlive and !_isZombie) then { if (s_player_studybody < 0) then { s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_studybody; s_player_studybody = -1; }; } else { //Gut Human player removeAction s_player_butcher_human; s_player_butcher_human = -1; //Gut Zombie player removeAction s_player_butcher_zombie; s_player_butcher_zombie = -1;
If you aren't calling your fn_selfActions.sqf file already you need to do that somewhere, usually in the init file
Code:fnc_usec_selfActions = compile preprocessFileLineNumbers "fixes\fn_selfActions.sqf";
You also need to call the variables.sqf file from your init.sqf:
Code:call compile preprocessFileLineNumbers "fixes\variables.sqf";
Inside the variables.sqf file you need to add the following code:
after dbz_Debug = 0; add this:
Code:s_player_butcher_human = -1; s_player_butcher_zombie = -1;
//player special variables
dayZ_lastPlayerUpdate = 0;
dayZ_everyonesTents = [];
dayz_hunger = 0;
dayz_thirst = 0;
dayz_combat = 0;
dayz_preloadFinished = false;
dayz_statusArray = [1,1];
dayz_disAudial = 0;
dayz_disVisual = 0;
dayz_firedCooldown = 0;
dayz_DeathActioned = false;
dayz_canDisconnect = true;
dayz_damageCounter = time;
dayz_lastSave = time;
dayz_isSwimming = true;
dayz_currentDay = 0;
dayz_hasLight = false;
dayz_surfaceNoise = 0;
dayz_surfaceType = "None";
dayz_noPenalty = [];
dayz_heavenCooldown = 0;
deathHandled = false;
dayz_lastHumanity = 0;
dayz_guiHumanity = -90000;
dayz_firstGroup = group player;
dayz_originalPlayer = player;
dayz_playerName = "Unknown";
dayz_sourceBleeding = objNull;
dayz_clientPreload = false;
dayz_panicCooldown = 0;
dayz_areaAffect = 2;
dayz_heartBeat = false;
dayzClickTime = 0;
dayz_spawnDelay = 120;
dayz_spawnWait = -120;
dayz_lootDelay = 3;
dayz_lootWait = -300;
dayz_spawnZombies = 0;
//used to count global zeds around players
dayz_CurrentZombies = 0;
//Used to limit overall zed counts
dayz_maxCurrentZeds = 0;
dayz_inVehicle = false;
dayz_Magazines = [];
dayzGearSave = false;
dayz_unsaved = false;
dayz_scaleLight = 0;
dayzDebug = false;
dayzState = -1;
s_player_butcher_human = -1;
s_player_butcher_zombie = -1;
//uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
//if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
// dayzDebug = true;
//};
};
class zZombie_base: Default {
yield = 1;
rawfoodtype = "FoodZombieRaw";
};
class z_policeman: zZombie_base {};