-
Posts
51 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Articles
Posts posted by Harkness
-
-
18 hours ago, BigEgg said:
Please disable DZAI and confirm that the issue with god mode persists with WAI only.
Iv not had any issues with god mode myself but another admin today reported that his was stuck on even after relog and we have yet to find a fix for him (he is able to turn off but when relog its back on). We use both WAI and DZAI and so far nothing in server or client logs to speak of
-
3 hours ago, Reaper5150 said:
Modify your player_alertZombies.sqf (_dis) dayz_code/compile from the dayz_code.pbo and move it to your mission side.
Lower the amount of zed spawns in your init.sqf
dayz_maxGlobalZeds = 25;
If you don't want the zeds running and walk instead configVariables.sqf
DZE_ZombieSpeed = [2,2]; walking
DZE_ZombieSpeed = [2,6]; walk and run
DZE_ZombieSpeed = [6,6]; running
Awesome thanks I know about zombie speeds and global max zeds. Thats not what we are saying though.. But thanks anyway
-
iv noticed this too.. Doesnt seem to be a setting for that though... yet xD
-
Can anyone actually confirm they have this working as of the latest script version 1.6 and have fully tested its function.
Iv installed this many times before on previous epoch versions but cannot get it running on 107 out the box. I will have to have a closer look what is going on but there are about 1 thousand undefines variables / errors as is.
-
-
On 4/30/2021 at 5:30 PM, Vladick said:
Hey there. I'm having trouble adding this to my 1.0.7 server. I used the original install instructions and the edited mf-tow files but it doesn't seem to be working. Does anyone have files and install instructions that can be used for Epoch 1.0.7?
Thanks!
Vlad
Iv just finished setting this up on my 107 server now mate, what are you having problems with maybe i can help? It is working great on our server tested on Namalsk Epoch 107 i towed a vehicle to a new location then checked on both client and server logs to find them clean.
Maybe try a reinstall. Hope this helps, dont forget you also need toolbox -
On 1/24/2021 at 8:00 AM, noswal said:
I'm putting a LAN server together and slowly implementing scripts. This works although a bit of a game breaker in term of realism of towing a C130 down narrow forest roads
since altered two lines to make attach/detach blue in menu in init.sqf lines 170, 172
s_player_towing = player addAction [("<t color=""#0000ff"">" + ("Attach Tow") +"</t>"), format["%1\tow_AttachTow.sqf", MF_Tow_Base_Path], _cursorTarget, 0, false, true,"",""];
s_player_towing = player addAction [("<t color=""#0000ff"">" + ("Detach Tow") +"</t>"), format["%1\tow_DetachTow.sqf",
If you search for " MF_Tow_Towable_Array " you can modify which vehicles
-
I need to do this again for my 107 server so i will have another look at it. its not hard to update outdated variables though. i think if i remember right the epoch devs post all the ones that have change to a text file in the Documents folder. id be more worried about that epoch antihack. i had a right pain in the but with infistar last time i did this
-
-
Wonderful script thank you for putting the time in and not asking for a subscriptions of any sort! Im using it now got bored with SA. Had some issues with the antihack/admin scripts not liking any .hpp files within my mission file and giving me false "not found" errors but put it down to human error as started over and running great. Dont you just hate when that happens.
-
New Maps Namalsk and Takistan is up and running.
-
-
Please consider joining our custom Epoch | DayZ | Expansion | Namalsk or Takistan servers, we have 2 long term Admins on both UK/US continents and run our servers completely for charity and from 100% clean and renewable energy too!
Click here to join our Discord for more informationDayZSA Expansion Namalsk | DayZSA Expansion Takistan | A2 DayZ Epoch Namalsk
86.10.6.13:2402 | 86.10.6.13:2602 | 86.10.6.13:2302Custom Content:
- Armed Roaming / Dynamic AI Bandit Patrols
- Custom Land and Air Trader Camps
- Banking and Wallets
- Customization Land Rovers
- Advanced Weaponry
- No Vehicle Crash Damage & Fix Vehicle Positions
- More weapons packs, loot+, vehicles+, custom clothing & backpacks
- Bounty Hunting
- Unlimited Stamina
- PvP & Raiding
- Modular Vests
- Igloo CraftingThanks we hope to see you there!
CPU: Xeon-X5690 @ 3.46GHz
RAM: 16GB
Storage: SSDAdditional Features:
ATM Banking | More Weapons | More Cars | More Loot | Namalsk Igloo | Light Saber Mod | No-Vehicle-Crash-Damage | Trader Wallet - Money/Item Storage | Custom Namalsk Spawn Selection | Custom Trader Cities | All items added to traders |Namalsk Airdrops | | Notification System | Territories System | Auto-run System | No Stamina System | Safezone System | Mission System | Skin System | Map UI and 2D/3D Markers System | KillFeed System | Towing System | Player Attachment | Custom lighting | Custom interiors | Custom ocean | Working Street lights | Builderitems | Gravecross | KillFeed | Notifications | Gravecross | Horn | Autorun | No stamina | MoreGuns | Street lights | Car Keys | CodeLock | Map UI and 2D/3D Markers | Global/Transport/Party Chat | Book (Server Info, Rules, player stats | party management | territory management) System
-
From what I see this was made by user matt-d-rat about 6 years ago. All i did was light up a few smokes and update all the old variable names to get it running on our 1062 + 107 servers from which we use a lot of scripts from here so here is a contribution back from me. I only added Epoch Vehicles in there.
All you need to do is follow matt-d-rats Original Instructions above, But instead of using the old files he made use my edited versions below
mf-tow\init.sqf
Spoiler/**
* mf-tow/init.sqf
* The main script for initalising towing functionality.
*
* Created by Matt Fairbrass (matt_d_rat)
* Version: 1.1.2
* MIT Licence
**/private ["_cursorTarget", "_towableVehicles", "_towableVehiclesTotal"];
// Public variables
MF_Tow_Base_Path = "addons\mf-tow"; // The base path to the MF-Tow Folder.
MF_Tow_Distance = 10; // Minimum distance (in meters) away from vehicle the tow truck must be to tow.
MF_Tow_Multi_Towing = false; // Allow a vehicle which is towing another vehicle already to be towed by another tow. Disabled by default.// Functions
/**
* Returns an array of towable objects which can be pulled by the tow truck.
* Configure this as required to set which vehicles can pull which types of other vehicles.
**/
MF_Tow_Towable_Array =
{
private ["_array","_towTruck"];
_towTruck = _this select 0;
_array = [];
switch (typeOf _towTruck) do
{
// ATVs
case "ATV_CZ_EP1": {_array = ["Motorcycle"];};
case "ATV_US_EP1": {_array = ["Motorcycle"];};
// Cars
case "car_hatchback": {_array = ["Motorcycle","Car"];};
case "car_sedan": {_array = ["Motorcycle","Car"];};
case "GLT_M300_LT": {_array = ["Motorcycle","Car"];};
case "GLT_M300_ST": {_array = ["Motorcycle","Car"];};
case "Lada1": {_array = ["Motorcycle","Car"];};
case "Lada1_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "Lada2": {_array = ["Motorcycle","Car"];};
case "Lada2_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "LadaLM": {_array = ["Motorcycle","Car"];};
case "UAZ_CDF": {_array = ["Motorcycle","Car"];};
case "UAZ_INS": {_array = ["Motorcycle","Car"];};
case "UAZ_MG_TK_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "UAZ_RU": {_array = ["Motorcycle","Car"];};
case "UAZ_Unarmed_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "UAZ_Unarmed_TK_EP1": {_array = ["Motorcycle","Car"];};
case "UAZ_Unarmed_UN_EP1": {_array = ["Motorcycle","Car"];};
case "VWGolf": {_array = ["Motorcycle","Car"];};
case "Skoda": {_array = ["Motorcycle","Car"];};
case "SkodaBlue": {_array = ["Motorcycle","Car"];};
case "SkodaGreen": {_array = ["Motorcycle","Car"];};
case "SkodaRed": {_array = ["Motorcycle","Car"];};
case "VolhaLimo_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "Volha_1_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "Volha_2_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "S1203_ambulance_EP1": {_array = ["Motorcycle","Car"];};
case "S1203_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "LandRover_CZ_EP1": {_array = ["Motorcycle","Car"];};
case "LandRover_MG_TK_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "LandRover_Special_CZ_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "LandRover_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "datsun1_civil_1_open_DZE": {_array = ["Motorcycle","Car"];};
case "datsun1_civil_2_covered_DZE": {_array = ["Motorcycle","Car"];};
case "datsun1_civil_3_open_DZE": {_array = ["Motorcycle","Car"];};
case "hilux1_civil_1_open_DZE": {_array = ["Motorcycle","Car"];};
case "hilux1_civil_2_covered_DZE": {_array = ["Motorcycle","Car"];};
case "hilux1_civil_3_open_DZE": {_array = ["Motorcycle","Car"];};
case "Offroad_DSHKM_Gue_DZE": {_array = ["Motorcycle","Car"];};
case "Pickup_PK_GUE_DZE": {_array = ["Motorcycle","Car"];};
case "Pickup_PK_INS_DZE": {_array = ["Motorcycle","Car"];};
case "Pickup_PK_TK_GUE_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "HMMWV_Ambulance": {_array = ["Motorcycle","Car"];};
case "HMMWV_Ambulance_CZ_DES_EP1": {_array = ["Motorcycle","Car"];};
case "HMMWV_DES_EP1": {_array = ["Motorcycle","Car"];};
case "HMMWV_DZ": {_array = ["Motorcycle","Car"];};
case "HMMWV_M1035_DES_EP1": {_array = ["Motorcycle","Car"];};
case "HMMWV_M1151_M2_CZ_DES_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "HMMWV_M998A2_SOV_DES_EP1_DZE": {_array = ["Motorcycle","Car"];};
case "ArmoredSUV_PMC_DZE": {_array = ["Motorcycle","Car"];};
case "SUV_Blue": {_array = ["Motorcycle","Car"];};
case "SUV_Camo": {_array = ["Motorcycle","Car"];};
case "SUV_Charcoal": {_array = ["Motorcycle","Car"];};
case "SUV_Green": {_array = ["Motorcycle","Car"];};
case "SUV_Orange": {_array = ["Motorcycle","Car"];};
case "SUV_Pink": {_array = ["Motorcycle","Car"];};
case "SUV_Red": {_array = ["Motorcycle","Car"];};
case "SUV_Silver": {_array = ["Motorcycle","Car"];};
case "SUV_TK_CIV_EP1": {_array = ["Motorcycle","Car"];};
case "SUV_White": {_array = ["Motorcycle","Car"];};
case "SUV_Yellow": {_array = ["Motorcycle","Car"];};
// Trucks
case "Kamaz_DZE": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "KamazRefuel_DZ": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "UralRefuel_TK_EP1_DZ": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "Ural_CDF": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "Ural_TK_CIV_EP1": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "Ural_UN_EP1": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "V3S_Open_TK_CIV_EP1": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "V3S_Open_TK_EP1": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "V3S_Refuel_TK_GUE_EP1_DZ": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "MtvrRefuel_DES_EP1_DZ": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "MTVR_DES_EP1": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
// Tractors
case "tractor": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
case "TowingTractor": {_array = ["Motorcycle","Car","Truck","Wheeled_APC","Tracked_APC","Air"];};
};
_array
};/**
* Animate the player in a towing action, whilst attaching them to the tow vehicle to ensure safety.
**/
MF_Tow_Animate_Player_Tow_Action =
{
private ["_towTruck","_offsetZ"];
_towTruck = _this select 0;
_offsetZ = 0.1;
// Bounding box on UAZ is screwed, offset z-axis correctly
if(_towTruck isKindOf "UAZ_Base") then {
_offsetZ = 1.8;
};
[player,20,true,(getPosATL player)] spawn player_alertZombies; // Alert nearby zombies
["Working",0,[20,40,15,0]] call dayz_NutritionSystem; // Use some hunger and thirst to perform the action
// Attach the player to the tow truck temporarily for safety so that they aren't accidentally hit by the vehicle when it gets attached
player attachTo [_towTruck,
[
(boundingBox _towTruck select 1 select 0),
(boundingBox _towTruck select 0 select 1) + 1,
(boundingBox _towTruck select 0 select 2) - (boundingBox player select 0 select 2) + _offsetZ
]
];player setDir 270;
player setPos (getPos player);
player playActionNow "Medic"; // Force the animation
};MF_Tow_Get_Vehicle_Name =
{
private ["_vehicle", "_configVeh", "_vehicleName"];
_vehicle = _this select 0;
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
_vehicleName = getText(_configVeh >> "displayName");
_vehicleName
};// Initialise script
_cursorTarget = cursorTarget;
_towableVehicles = [_cursorTarget] call MF_Tow_Towable_Array;
_towableVehiclesTotal = count (_towableVehicles);// Add the action to the players scroll wheel menu if the cursor target is a vehicle which can tow.
if(_towableVehiclesTotal > 0) then {
if (s_player_towing < 0) then {
if(!(_cursorTarget getVariable ["MFTowIsTowing", false])) then {
s_player_towing = player addAction ["Attach Tow", format["%1\tow_AttachTow.sqf", MF_Tow_Base_Path], _cursorTarget, 0, false, true, "",""];
} else {
s_player_towing = player addAction ["Detach Tow", format["%1\tow_DetachTow.sqf", MF_Tow_Base_Path], _cursorTarget, 0, false, true, "",""];
};
};
}
else {
player removeAction s_player_towing;
s_player_towing = -1;
};mf-tow\tow_AttachTow.sqf
Spoiler/**
* mf-tow/tow_AttachTow.sqf
* The action for attaching the tow to another vehicle.
*
* Created by Matt Fairbrass (matt_d_rat)
* Version: 1.1.2
* MIT Licence
**/private ["_vehicle","_started","_finished","_animState","_isMedic","_abort","_vehicleNameText","_towTruckNameText","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle","_towTruck","_towableVehicles","_towableVehiclesTotal","_vehicleOffsetY","_towTruckOffsetY","_offsetZ","_hasToolbox"];
if(dayz_actionInProgress) exitWith { cutText [(localize "str_epoch_player_96") , "PLAIN DOWN"] };
dayz_actionInProgress = true;player removeAction s_player_towing;
s_player_towing = 1;// Tow Truck
_towTruck = _this select 3;
_towableVehicles = [_towTruck] call MF_Tow_Towable_Array;
_towableVehiclesTotal = count (_towableVehicles);
_towTruckNameText = [_towTruck] call MF_Tow_Get_Vehicle_Name;// Get all nearby vehicles that can be towed by the towTruck within the minimum tow distance
_findNearestVehicles = nearestObjects [_towTruck, _towableVehicles, MF_Tow_Distance];
_findNearestVehicle = [];
{
if (alive _x && _towTruck != _x) then {
_findNearestVehicle set [(count _findNearestVehicle),_x];
};
} foreach _findNearestVehicles;
_IsNearVehicle = count (_findNearestVehicle);if(_IsNearVehicle > 0) then {
// select the nearest one
_vehicle = _findNearestVehicle select 0;
_vehicleNameText = [_vehicle] call MF_Tow_Get_Vehicle_Name;
_hasToolbox = "ItemToolbox" in (items player);
// Check the player has a toolbox
if(!_hasToolbox) exitWith {
cutText ["Cannot attach tow without a toolbox.", "PLAIN DOWN"];
};
// Check if the vehicle we want to tow is locked
if((_vehicle getVariable ["MF_Tow_Cannot_Tow", false])) exitWith {
cutText [format["Cannot tow %1 because it is locked.", _vehicleNameText], "PLAIN DOWN"];
};
// Check that the vehicle we want to tow is not already being towed by something else.
if((_vehicle getVariable ["MFTowInTow", false])) exitWith {
cutText [format["Cannot tow %1 because it is already being towed by another vehicle.", _vehicleNameText], "PLAIN DOWN"];
};
// Check that the vehicle we want to tow is not already towing something else
if(!MF_Tow_Multi_Towing && (_vehicle getVariable ["MFTowIsTowing", false])) exitWith {
cutText [format["Cannot tow %1 because it is already towing another vehicle.", _vehicleNameText], "PLAIN DOWN"];
};
// Check if the vehicle has anyone in it
if ((count (crew _vehicle)) != 0) exitWith {
cutText [format["Cannot tow %1 because it has people in it.", _vehicleNameText], "PLAIN DOWN"];
};
_finished = false;
[_towTruck] call MF_Tow_Animate_Player_Tow_Action;
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
// Check if anyone enters the vehicle while we are attaching the tow and stop the action
if ((count (crew _vehicle)) != 0) then {
cutText [format["Towing aborted because the %1 was entered by another player.", _vehicleNameText], "PLAIN DOWN"];
r_interrupt = true;
};
if (r_interrupt) then {
detach player;
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;if(!_finished) then {
r_interrupt = false;
if (vehicle player == player) then {
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
};
_abort = true;
};if (_finished) then {
if(((vectorUp _vehicle) select 2) > 0.5) then {
if( _towableVehiclesTotal > 0 ) then {
_towTruckOffsetY = 0.8;
_vehicleOffsetY = 0.8;
_offsetZ = 0.1;
// Calculate the offset positions depending on the kind of tow truck
switch(true) do {
case (_towTruck isKindOf "ArmoredSUV_Base_PMC");
case (_towTruck isKindOf "SUV_Base_EP1") : {
_towTruckOffsetY = 0.9;
};
case (_towTruck isKindOf "UAZ_Base" && !(_vehicle isKindOf "UAZ_Base")) : {
_offsetZ = 1.8;
};
};
// Calculate the offset positions depending on the kind of vehicle
switch(true) do {
case (_vehicle isKindOf "Truck" && !(_towTruck isKindOf "Truck")) : {
_vehicleOffsetY = 0.9;
};
case (_vehicle isKindOf "UAZ_Base" && !(_towTruck isKindOf "UAZ_Base")) : {
_offsetZ = -1.8;
};
};
// Attach the vehicle to the tow truck
_vehicle attachTo [ _towTruck,
[
0,
(boundingBox _towTruck select 0 select 1) * _towTruckOffsetY + (boundingBox _vehicle select 0 select 1) * _vehicleOffsetY,
(boundingBox _towTruck select 0 select 2) - (boundingBox _vehicle select 0 select 2) + _offsetZ
]
];
detach player;
_vehicle lock true; // Disable entering the vehicle while it is in tow.
_vehicle setVariable ["MFTowInTow", true, true];
_towTruck setVariable ["MFTowIsTowing", true, true];
_towTruck setVariable ["MFTowVehicleInTow", _vehicle, true];
cutText [format["%1 has been attached to %2.", _vehicleNameText, _towTruckNameText], "PLAIN DOWN"];
};
} else {
cutText [format["Failed to attach %1 to %2.", _vehicleNameText, _towTruckNameText], "PLAIN DOWN"];
};
};
} else {
cutText [format["No vehicles nearby to tow. Move within %1m of a vehicle.", MF_Tow_Distance], "PLAIN DOWN"];
};
dayz_actionInProgress = false;
s_player_towing = -1;mf-tow\tow_DetachTow.sqf
Spoiler/**
* mf-tow/tow_DetachTow.sqf
* The action for detaching the tow from another vehicle.
*
* Created by Matt Fairbrass (matt_d_rat)
* Version: 1.1.2
* MIT Licence
**/
private ["_vehicle","_started","_finished","_animState","_isMedic","_vehicleNameText","_towTruckNameText","_towTruck","_isTowing","_hasToolbox"];if(dayz_actionInProgress) exitWith { cutText [(localize "str_epoch_player_96") , "PLAIN DOWN"] };
dayz_actionInProgress = true;player removeAction s_player_towing;
s_player_towing = 1;// Tow Truck
_towTruck = _this select 3;
_towTruckNameText = [_towTruck] call MF_Tow_Get_Vehicle_Name;// exit if no vehicle is in tow.
_isTowing = _towTruck getVariable ["MFTowIsTowing", false];if(_isTowing) then {
// Select the vehicle currently in tow
_vehicle = _towTruck getVariable ["MFTowVehicleInTow", objNull];if(!(isNull _vehicle)) then {
_vehicleNameText = [_vehicle] call MF_Tow_Get_Vehicle_Name;
_finished = false;
_hasToolbox = "ItemToolbox" in (items player);
// Check the player has a toolbox
if(!_hasToolbox) exitWith {
cutText ["Cannot dettach tow without a toolbox.", "PLAIN DOWN"];
};
[_towTruck] call MF_Tow_Animate_Player_Tow_Action;r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
detach player;
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;if(!_finished) then {
r_interrupt = false;
if (vehicle player == player) then {
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
};
};if (_finished) then {
detach _vehicle;
detach player;
_vehicle lock false; // Enable players to re-enter the vehicle now it has been detached.
_vehicle setVariable ["MFTowInTow", false, true];
_towTruck setVariable ["MFTowIsTowing", false, true];
_towTruck setVariable ["MFTowVehicleInTow", objNull, true];
cutText [format["%1 has been detached from %2. Start engine to save new possition", _vehicleNameText, _towTruckNameText], "PLAIN DOWN"];
_vehicle setvelocity [0,0,1];
};
} else {
_towTruck setVariable ["MFTowIsTowing", false, true];
_towTruck setVariable ["MFTowVehicleInTow", objNull, true];
};
} else {
cutText ["No vehicles in tow.", "PLAIN DOWN"];
};
dayz_actionInProgress = false;
s_player_towing = -1; -
Ahoj!
This is really great thanks will save us a lot of times and fiddling about. All working well in game,
I am having a problem which is spamming client RPT with :SpoilerError in expression <if (s_player_copyToKey < 0) then {
if ((_hasKey && {"ItemKeyKit" in weapons play>
Error position: <_hasKey && {"ItemKeyKit" in weapons play>
Error Undefined variable in expression: _haskey
File mpmissions\__CUR_MP.namalsk\Custom\fn_selfActions.sqf, line 583In fn_selfActions.sqf i believe iv merged them how shown in the download, id redone it about 5 times now :( (I made your merges/additions bold to easy find them)
SpoilerscriptName "Functions\misc\fn_selfActions.sqf";
/***********************************************************
ADD ACTIONS FOR SELF
- Function
- [] call fnc_usec_selfActions;
************************************************************/
private ["_canPickLight","_text","_unlock","_lock","_totalKeys","_temp_keys","_temp_keys_names","_restrict",
"_hasKey","_oldOwner","_hasAttached","_isZombie","_isHarvested","_isMan","_isFuel","_hasRawMeat","_hastinitem","_player_deleteBuild",
"_player_lockUnlock_crtl","_displayName","_hasIgnitors","_menu","_menu1","_allowTow","_liftHeli","_found","_posL","_posC","_height","_attached",
"_combi","_findNearestGen","_humanity_logic","_low_high","_cancel","_buy","_buyV","_humanity","_traderMenu","_warn","_typeOfCursorTarget",
"_isVehicle","_isBicycle","_isDestructable","_isGenerator","_ownerID","_isVehicletype","_hasBarrel","_hasFuel20","_hasFuel5","_hasEmptyFuelCan",
"_itemsPlayer","_hasToolbox","_hasbottleitem","_isAlive","_isPlant","_istypeTent","_upgradeItems","_isDisallowRefuel","_isDog",
"_isModular","_isModularDoor","_isHouse","_isGateOperational","_isGateLockable","_isFence","_isLockableGate","_isUnlocked","_isOpen","_isClosed","_ownerArray","_ownerBuildLock",
"_ownerPID","_speed","_dog","_vehicle","_inVehicle","_cursorTarget","_primaryWeapon","_currentWeapon","_magazinesPlayer","_onLadder","_canDo",
"_nearLight","_vehicleOwnerID","_hasHotwireKit","_isPZombie","_dogHandle","_allowedDistance","_id","_upgrade","_weaponsPlayer","_hasCrowbar",
"_allowed","_hasAccess","_uid","_myCharID","_isLocked"];_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
_cursorTarget = cursorTarget;
_primaryWeapon = primaryWeapon player;
_currentWeapon = currentWeapon player;
_magazinesPlayer = magazines player;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder);
_uid = getPlayerUID player;
_nearLight = nearestObject [player,"LitObject"];
_canPickLight = false;
_myCharID = player getVariable ["CharacterID","0"];
_vehicleOwnerID = _vehicle getVariable ["CharacterID","0"];
_hasHotwireKit = "ItemHotwireKit" in _magazinesPlayer;
_isPZombie = player isKindOf "PZombie_VB";
_dogHandle = player getVariable ["dogID",0];if (!isNull _nearLight) then {
if (_nearLight distance player < 4) then {
_canPickLight = isNull (_nearLight getVariable ["owner",objNull]);
};
};//Grab Flare
if (_canPickLight && !dayz_hasLight && !_isPZombie) then {
if (s_player_grabflare < 0) then {
_text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName");
s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true];
s_player_removeflare = player addAction [format[localize "str_actions_medical_17",_text], "\z\addons\dayz_code\actions\flare_remove.sqf",_nearLight, 1, false, true];
};
} else {
player removeAction s_player_grabflare;
player removeAction s_player_removeflare;
s_player_grabflare = -1;
s_player_removeflare = -1;
};if (s_player_equip_carry < 0) then {
if (dayz_onBack != "" && { !_inVehicle && { !_onLadder && { !r_player_unconscious } } }) then {
dz_plr_carryActionItem = dayz_onBack;
_text = getText (configFile >> "CfgWeapons" >> dz_plr_carryActionItem >> "displayName");
s_player_equip_carry = player addAction [
format [localize "STR_ACTIONS_WEAPON", _text],
"\z\addons\dayz_code\actions\player_switchWeapon_action.sqf",
nil, 0.5, false, true];
};
} else {
if (dayz_onBack != dz_plr_carryActionItem || { _inVehicle || { _onLadder || { r_player_unconscious } } } ) then {
player removeAction s_player_equip_carry;
s_player_equip_carry = -1;
};
};//fishing
if ((_currentWeapon in Dayz_fishingItems) && {!dayz_fishingInprogress} && {!_inVehicle} && {!dayz_isSwimming}) then {
if (s_player_fishing < 0) then {
s_player_fishing = player addAction [localize "STR_ACTION_CAST", "\z\addons\dayz_code\actions\player_goFishing.sqf",player, 0.5, false, true];
};
} else {
player removeAction s_player_fishing;
s_player_fishing = -1;
};
if ((_primaryWeapon in Dayz_fishingItems) && {!dayz_fishingInprogress} && {_inVehicle && (driver _vehicle != player)}) then {
if (s_player_fishing_veh < 0) then {
s_player_fishing_veh = _vehicle addAction [localize "STR_ACTION_CAST", "\z\addons\dayz_code\actions\player_goFishing.sqf",_vehicle, 0.5, false, true];
};
} else {
_vehicle removeAction s_player_fishing_veh;
s_player_fishing_veh = -1;
};if (_inVehicle) then {
DZE_myVehicle = _vehicle;
if (_vehicleOwnerID != "0" && _canDo) then {
if (s_player_lockUnlockInside_ctrl < 0) then {
_totalKeys = call epoch_tempKeys;
_temp_keys = _totalKeys select 0;
_temp_keys_names = _totalKeys select 1;
_hasKey = _vehicleOwnerID in _temp_keys;
_oldOwner = (_vehicleOwnerID == _uid);
_text = getText (configFile >> "CfgVehicles" >> (typeOf DZE_myVehicle) >> "displayName");
if (locked DZE_myVehicle) then {
if (_hasKey || _oldOwner) then {
_unlock = DZE_myVehicle addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[DZE_myVehicle,(_temp_keys_names select (_temp_keys find _vehicleOwnerID))], 2, false, true];
s_player_lockUnlockInside set [count s_player_lockUnlockInside,_unlock];
s_player_lockUnlockInside_ctrl = 1;
} else {
if (_hasHotwireKit) then {
_unlock = DZE_myVehicle addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",DZE_myVehicle, 2, true, true];
} else {
_unlock = DZE_myVehicle addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",DZE_myVehicle, 2, true, true];
};
s_player_lockUnlockInside set [count s_player_lockUnlockInside,_unlock];
s_player_lockUnlockInside_ctrl = 1;
};
} else {
if (_hasKey || _oldOwner) then {
_lock = DZE_myVehicle addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",DZE_myVehicle, 1, false, true];
s_player_lockUnlockInside set [count s_player_lockUnlockInside,_lock];
s_player_lockUnlockInside_ctrl = 1;
};
};
};
} else {
{DZE_myVehicle removeAction _x} count s_player_lockUnlockInside;s_player_lockUnlockInside = [];
s_player_lockUnlockInside_ctrl = -1;
};
} else {
{DZE_myVehicle removeAction _x} count s_player_lockUnlockInside;s_player_lockUnlockInside = [];
s_player_lockUnlockInside_ctrl = -1;
};if (DZE_HeliLift) then {
_hasAttached = _vehicle getVariable["hasAttached",false];
if (_inVehicle && {_vehicle isKindOf "Air"} && {(([_vehicle] call FNC_getPos) select 2) < 30} && {speed _vehicle < 5} && {typeName _hasAttached == "OBJECT"}) then {
if (s_player_heli_detach < 0) then {
dayz_myLiftVehicle = _vehicle;
s_player_heli_detach = dayz_myLiftVehicle addAction [localize "STR_EPOCH_ACTIONS_DETACHVEHICLE","\z\addons\dayz_code\actions\player_heliDetach.sqf",[dayz_myLiftVehicle,_hasAttached],2,false,true];
};
} else {
dayz_myLiftVehicle removeAction s_player_heli_detach;
s_player_heli_detach = -1;
};
};if (DZE_HaloJump) then {
if (_inVehicle && {_vehicle isKindOf "Air"} && {(([_vehicle] call FNC_getPos) select 2) > 400}) then {
if (s_halo_action < 0) then {
DZE_myHaloVehicle = _vehicle;
s_halo_action = DZE_myHaloVehicle addAction [localize "STR_EPOCH_ACTIONS_HALO","\z\addons\dayz_code\actions\halo_jump.sqf",[],2,false,true];
};
} else {
DZE_myHaloVehicle removeAction s_halo_action;
s_halo_action = -1;
};
};if (DZE_NameTags > 0) then {
if (s_player_showname < 0 && !_isPZombie) then {
if (DZE_NameTags < 2) then {
s_player_showname = 1;
player setVariable["DZE_display_name",true,true];
} else {
s_player_showname = player addAction [localize "STR_EPOCH_ACTIONS_NAMEYES", "\z\addons\dayz_code\actions\display_name.sqf",true, 0, true, false];
s_player_showname1 = player addAction [localize "STR_EPOCH_ACTIONS_NAMENO", "\z\addons\dayz_code\actions\display_name.sqf",false, 0, true, false];
};
};
};if (_isPZombie) then {
if (s_player_attack < 0) then {
s_player_attack = player addAction [localize "STR_EPOCH_ACTIONS_ATTACK", "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf", _cursorTarget, 6, false, true];
};
if (s_player_callzombies < 0) then {
s_player_callzombies = player addAction [localize "STR_EPOCH_ACTIONS_RAISEHORDE", "\z\addons\dayz_code\actions\pzombie\call_zombies.sqf",player, 5, true, false];
};
if (s_player_pzombiesvision < 0) then {
s_player_pzombiesvision = player addAction [localize "STR_EPOCH_ACTIONS_NIGHTVIS", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"];
};
if (!isNull _cursorTarget && (player distance _cursorTarget < 3)) then {
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isHarvested = _cursorTarget getVariable["meatHarvested",false];
_isMan = _cursorTarget isKindOf "Man"; //includes animals and zombies
if (!alive _cursorTarget && _isMan && !_isZombie && !_isHarvested) then {
if (s_player_pzombiesfeed < 0) then {
s_player_pzombiesfeed = player addAction [localize "STR_EPOCH_ACTIONS_FEED", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",_cursorTarget, 3, true, false];
};
} else {
player removeAction s_player_pzombiesfeed;
s_player_pzombiesfeed = -1;
};
} else {
player removeAction s_player_pzombiesfeed;
s_player_pzombiesfeed = -1;
};
};// Increase distance only if AIR or SHIP
_allowedDistance = if ((_cursorTarget isKindOf "Air") or (_cursorTarget isKindOf "Ship")) then {8} else {4};if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cursorTarget < _allowedDistance) && _canDo) then {
//Has some kind of target
_typeOfCursorTarget = typeOf _cursorTarget;
_isVehicle = _cursorTarget isKindOf "AllVehicles";
_isBicycle = _cursorTarget isKindOf "Bicycle";
_isMan = _cursorTarget isKindOf "Man"; //includes animals and zombies
_isDestructable = _cursorTarget isKindOf "BuiltItems";
_isGenerator = _typeOfCursorTarget == "Generator_DZ";
_isLocked = locked _cursorTarget;
//_isVehicletype = _typeOfCursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"]; //Checked in player_flipvehicle
_isFuel = false;
_hasBarrel = "ItemFuelBarrel" in _magazinesPlayer;
_hasFuel20 = "ItemJerrycan" in _magazinesPlayer;
_hasFuel5 = "ItemFuelcan" in _magazinesPlayer;
_hasEmptyFuelCan = (("ItemJerrycanEmpty" in _magazinesPlayer) || ("ItemFuelcanEmpty" in _magazinesPlayer) || ("ItemFuelBarrelEmpty" in _magazinesPlayer));
_itemsPlayer = items player;
_weaponsPlayer = weapons player;
_hasCrowbar = "ItemCrowbar" in _itemsPlayer or "MeleeCrowbar" in _weaponsPlayer or dayz_onBack == "MeleeCrowbar";
_hasToolbox = "ItemToolbox" in _itemsPlayer;
_hasbottleitem = (("ItemWaterBottle" in _magazinesPlayer) || {"ItemWaterBottleInfected" in _magazinesPlayer} || {"ItemWaterBottleSafe" in _magazinesPlayer} || {"ItemWaterBottleBoiled" in _magazinesPlayer});
_isAlive = alive _cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");
_isPlant = _typeOfCursorTarget in Dayz_plants;
_istypeTent = (_cursorTarget isKindOf "TentStorage_base") or (_cursorTarget isKindOf "IC_Tent");
_upgradeItems = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3"];
_characterID = _cursorTarget getVariable ["CharacterID","0"];
if (DZE_permanentPlot) then {
_id = _uid;
_ownerID = _cursorTarget getVariable ["ownerPUID","0"];
} else {
_id = _myCharID;
_ownerID = _characterID;
};_isDisallowRefuel = _typeOfCursorTarget in ["M240Nest_DZ","MMT_Civ","MMT_USMC","Old_bike_TK_CIV_EP1","Old_bike_TK_INS_EP1"];
_isDog = (_cursorTarget isKindOf "Pastor" || _cursorTarget isKindOf "Fin");
_isModular = _cursorTarget isKindOf "ModularItems";
_isModularDoor = _typeOfCursorTarget in ["Land_DZE_WoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_GarageWoodDoor","CinderWallDoor_DZ","CinderWallDoorSmall_DZ"];
_player_deleteBuild = false;
_player_lockUnlock_crtl = false;
//fuel tanks
if (_hasEmptyFuelCan) then {
{
if (_cursorTarget isKindOf _x) exitWith {_isFuel = true;};
} count dayz_fuelsources;
};//remove gathered plant if empty
if (_isPlant) then {
_cursorTarget call player_gather;
};//flip vehicle
if (_isVehicle && {!_isMan} && {!(canMove _cursorTarget)} && {_isAlive} && {player distance _cursorTarget >= 2} && {(count (crew _cursorTarget))== 0} && {((vectorUp _cursorTarget) select 2) < 0.5}) then {
if (s_player_flipveh < 0) then {
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",_cursorTarget, 1, true, true];
};
} else {
player removeAction s_player_flipveh;
s_player_flipveh = -1;
};
//Allow player to fill Fuel can
if (_hasEmptyFuelCan && _isFuel && _isAlive) then {
if (s_player_fillfuel < 0) then {
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",_cursorTarget, 1, false, true];
};
} else {
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
};
if (damage _cursorTarget < 1) then {
//Allow player to fill vehicle 210L
if (_hasBarrel && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel210 < 0) then {
s_player_fillfuel210 = player addAction [format[localize "str_actions_medical_10",_text,"210"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelBarrel",_cursorTarget], 0, true, true];
};
} else {
player removeAction s_player_fillfuel210;
s_player_fillfuel210 = -1;
};
//Allow player to fill vehicle 20L
if (_hasFuel20 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel20 < 0) then {
s_player_fillfuel20 = player addAction [format[localize "str_actions_medical_10",_text,"20"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemJerrycan",_cursorTarget], 0, true, true];
};
} else {
player removeAction s_player_fillfuel20;
s_player_fillfuel20 = -1;
};//Allow player to fill vehicle 5L
if (_hasFuel5 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then {
if (s_player_fillfuel5 < 0) then {
s_player_fillfuel5 = player addAction [format[localize "str_actions_medical_10",_text,"5"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelcan",_cursorTarget], 0, true, true];
};
} else {
player removeAction s_player_fillfuel5;
s_player_fillfuel5 = -1;
};
/*
Vanilla generator is currently not functional.
Vanilla generator refuel actions removed for now.
Epoch generator fill action is below.
*/
//Allow player to siphon vehicles
if (_hasEmptyFuelCan && {!_isMan} && {_isVehicle} && {!_isBicycle} && {fuel _cursorTarget > 0}) then {
if (s_player_siphonfuel < 0) then {
s_player_siphonfuel = player addAction [format[localize "str_siphon_start"], "\z\addons\dayz_code\actions\siphonFuel.sqf",_cursorTarget, 0, true, true];
};
} else {
player removeAction s_player_siphonfuel;
s_player_siphonfuel = -1;
};
} else {
player removeAction s_player_fillfuel210;
s_player_fillfuel210 = -1;
player removeAction s_player_fillfuel20;
s_player_fillfuel20 = -1;
player removeAction s_player_fillfuel5;
s_player_fillfuel5 = -1;
player removeAction s_player_siphonfuel;
s_player_siphonfuel = -1;
};
//Fireplace Actions check
if ((_cursorTarget call isInflamed) or (inflamed _cursorTarget)) then {
_hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0;
//_hastinitem = {_x in boil_tin_cans} count _magazinesPlayer > 0;
_hasunboiledwater = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count _magazinesPlayer > 0;
//Cook Meat
if (_hasRawMeat && !a_player_cooking) then {
if (s_player_cook < 0) then {
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",_cursorTarget, 3, true, true];
};
};
//Boil Water
if (_hasunboiledwater && !a_player_boil) then {
if (s_player_boil < 0) then {
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursorTarget, 3, true, true];
};
};
} else {
if (a_player_cooking) then {
player removeAction s_player_cook;
s_player_cook = -1;
};
if (a_player_boil) then {
player removeAction s_player_boil;
s_player_boil = -1;
};
};
if (_isAlive) then {
_restrict = _typeOfCursorTarget in DZE_restrictRemoval;
//Allow player to remove objects with no ownership or access required
if (!_restrict && (_isDestructable || _typeOfCursorTarget in DZE_isWreck || _typeOfCursorTarget in DZE_isWreckBuilding || _typeOfCursorTarget in DZE_isRemovable)) then {
if (_hasToolbox && _hasCrowbar) then {
_player_deleteBuild = true;
};
};
//Allow player to remove objects only if they have proper ownership or access
if (_restrict || _isModular || _isModularDoor || _isGenerator || _typeOfCursorTarget in DZE_isDestroyableStorage) then {
if (_hasToolbox && _hasCrowbar) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then {
_player_deleteBuild = true;
};
};
};
if (_isVehicle) then {
if ((_characterID != "0") && {!_isMan}) then {
_player_lockUnlock_crtl = true;
};
};
};
if (_player_deleteBuild) then {
if (s_player_deleteBuild < 0) then {
s_player_deleteBuild = player addAction [format[localize "STR_EPOCH_REMOVE",_text], "\z\addons\dayz_code\actions\remove.sqf",_cursorTarget, 1, false, true];
};
} else {
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
};//remove Own objects
if (_ownerID == _id) then {
//upgrade items
if (_typeOfCursorTarget in _upgradeItems) then {
if (s_player_upgradestorage < 0) then {
_displayName = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");
s_player_upgradestorage = player addAction [format[localize "STR_EPOCH_UPGRADE",_displayName], "\z\addons\dayz_code\actions\object_upgradeStorage.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_upgradestorage;
s_player_upgradestorage = -1
};
if (_istypeTent) then {
//Packing my tent
if (s_player_packtent < 0) then {
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_packtent;
s_player_packtent = -1;
};
} else {
player removeAction s_player_upgradestorage;
s_player_upgradestorage = -1;
player removeAction s_player_packtent;
s_player_packtent = -1;
};
//other tents
if (_istypeTent) then {
_hasIgnitors = {_x in DayZ_Ignitors} count _itemsPlayer > 0;
if ((_hasFuel20 or _hasFuel5 or _hasBarrel) && _hasIgnitors) then {
if (s_player_destroytent < 0) then {
s_player_destroytent = player addAction [localize "str_actions_self_destroytent", "\z\addons\dayz_code\actions\player_destroyTent.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_destroytent;
s_player_destroytent = -1;
};
if (_typeOfCursorTarget in ["IC_DomeTent","IC_Tent"]) then {
if (s_player_packtentinfected < 0) then {
s_player_packtentinfected = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_packtentinfected;
s_player_packtentinfected = -1;
};
//sleep
if (s_player_sleep < 0) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_sleep;
s_player_sleep = -1;
};
//Study Body
if (_cursorTarget getVariable["bodyName",""] != "") 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;
};//Repairing Vehicles
if (_isVehicle && {!_isMan} && {dayz_myCursorTarget != _cursorTarget} && {_hasToolbox} && {damage _cursorTarget < 1} && {_typeOfCursorTarget != "M240Nest_DZ"}) then {
if (s_player_repair_crtl < 0) then {
dayz_myCursorTarget = _cursorTarget;
_menu = dayz_myCursorTarget addAction [localize "str_actions_repairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false];
if (!_isBicycle) then { //Bike wheels should not give full size tires. Also model does not update to show removed wheels.
if (!DZE_salvageLocked) then {
if (!_isLocked) then {
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
s_player_repairActions set [count s_player_repairActions,_menu1];
};
} else {
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
s_player_repairActions set [count s_player_repairActions,_menu1];
};
};
s_player_repairActions set [count s_player_repairActions,_menu];
s_player_repair_crtl = 1;
} else {
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;
s_player_repairActions = [];
s_player_repair_crtl = -1;
};
};
if (_typeOfCursorTarget == "Plastic_Pole_EP1_DZ" && {speed player <= 1}) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
_allowed = ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4));
if (DZE_permanentPlot) then {
if (s_player_plotManagement < 0 && _allowed) then {
s_player_plotManagement = player addAction [format["<t color='#b3e6ff'>%1</t>",localize "STR_EPOCH_ACTIONS_MANAGEPLOT"], "\z\addons\dayz_code\actions\plotManagement\initPlotManagement.sqf", [], 5, false];
};
} else {
if (s_player_maintain_area < 0) then {
s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
s_player_maintain_area_force = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_FORCE_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "force", 5, false];
s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
};
};
if (s_player_plot_boundary < 0 && (_allowed or (_hasAccess select 1))) then {
s_player_plot_boundary = player addAction [localize "STR_EPOCH_PLOTMANAGEMENT_SHOW_BOUNDARY", "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf", "", 1, false];
};
} else {
player removeAction s_player_plotManagement;
s_player_plotManagement = -1;
player removeAction s_player_maintain_area;
s_player_maintain_area = -1;
player removeAction s_player_maintain_area_force;
s_player_maintain_area_force = -1;
player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = -1;
player removeAction s_player_plot_boundary;
s_player_plot_boundary = -1;
};
if (DZE_HeliLift) then {
_liftHeli = objNull;
_found = false;
_allowTow = false;
if ((count (crew _cursorTarget)) == 0) then {
{
if (!_allowTow) then {
_allowTow = _cursorTarget isKindOf _x;
};
} count DZE_HeliAllowToTow;
};if (_allowTow) then {
{
if (!_found) then {
_posL = [_x] call FNC_getPos;
_posC = [_cursorTarget] call FNC_getPos;
_height = (_posL select 2) - (_posC select 2);
_hasAttached = _x getVariable["hasAttached",false];
if ((_height < 15) && {_height > 5} && {typeName _hasAttached != "OBJECT"}) then {
if (((abs((_posL select 0) - (_posC select 0))) < 10) && {(abs((_posL select 1) - (_posC select 1))) < 10}) then {
_liftHeli = _x;
_found = true;
};
};
};
} count (player nearEntities [DZE_HeliAllowTowFrom,15]);
};_attached = _cursorTarget getVariable["attached",false];
if (_found && {_allowTow} && {!_isLocked} && {!_isPZombie} && {typeName _attached != "OBJECT"}) then {
if (s_player_heli_lift < 0) then {
s_player_heli_lift = player addAction [localize "STR_EPOCH_ACTIONS_ATTACHTOHELI", "\z\addons\dayz_code\actions\player_heliLift.sqf",[_liftHeli,_cursorTarget], -10, false, true];
};
} else {
player removeAction s_player_heli_lift;
s_player_heli_lift = -1;
};
};
// Allow Owner to lock and unlock vehicle
if (_player_lockUnlock_crtl) then {
if (s_player_lockUnlock_crtl < 0) then {
_totalKeys = call epoch_tempKeys;
_temp_keys = _totalKeys select 0;
_temp_keys_names = _totalKeys select 1;
_hasKey = _characterID in _temp_keys;
_oldOwner = (_characterID == _uid);
if (_isLocked) then {
if (_hasKey || _oldOwner) then {
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (_temp_keys find _characterID))], 2, true, true];
s_player_lockunlock set [count s_player_lockunlock,_unlock];
s_player_lockUnlock_crtl = 1;
} else {
if (_hasHotwireKit) then {
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true];
} else {
_unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true];
};
s_player_lockunlock set [count s_player_lockunlock,_unlock];
s_player_lockUnlock_crtl = 1;
};
} else {
if (_hasKey || _oldOwner) then {
_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true];
s_player_lockunlock set [count s_player_lockunlock,_lock];
s_player_lockUnlock_crtl = 1;
};
};
};
if (s_player_copyToKey < 0) then {
if ((_hasKey && {"ItemKeyKit" in weapons player} && {(count _temp_keys) > 1} && {!_isLocked}) || {_cursorTarget getVariable ["hotwired",false]}) then {
s_player_copyToKey = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_VKC_CHANGE_ACTION"],"scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,if (_cursorTarget getVariable ["hotwired",false]) then {"claim"} else {"change"}],5,false,true];
};
};
} else {
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
player removeAction s_player_copyToKey;
s_player_copyToKey = -1;
};
// gear access on surrendered player
if (isPlayer _cursorTarget && {_isAlive} && {_cursorTarget getVariable ["DZE_Surrendered",false]}) then {
if (s_player_SurrenderedGear < 0) then {
s_player_SurrenderedGear = player addAction [localize "STR_UI_GEAR", "\z\addons\dayz_code\actions\surrender_gear.sqf",_cursorTarget, 1, true, true];
};
} else {
player removeAction s_player_SurrenderedGear;
s_player_SurrenderedGear = -1;
};// Allow manage door
if (DZE_doorManagement && (_typeOfCursorTarget in DZE_DoorsLocked)) then {
// Check player access
_hasAccess = [player, _cursorTarget] call FNC_check_access;
if (s_player_manageDoor < 0 && ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3) or (_hasAccess select 4) or (_hasAccess select 5) or (_hasAccess select 6))) then {
s_player_manageDoor = player addAction [format["<t color='#b3e6ff'>%1</t>", localize "STR_EPOCH_ACTIONS_MANAGEDOOR"], "\z\addons\dayz_code\actions\doorManagement\initDoorManagement.sqf", _cursorTarget, 5, false];
};
} else {
player removeAction s_player_manageDoor;
s_player_manageDoor = -1;
};//Allow owner to unlock vault
if ((_typeOfCursorTarget in DZE_LockableStorage) && {_characterID != "0"} && {player distance _cursorTarget < 3} && {!keypadCancel}) then {
if (s_player_unlockvault < 0) then {
if (_typeOfCursorTarget in DZE_LockedStorage) then {
if (_characterID == dayz_combination || _ownerID == _uid) then {
_combi = player addAction [format[localize "STR_EPOCH_ACTIONS_OPEN",_text], "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true];
s_player_combi set [count s_player_combi,_combi];
} else {
_combi = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true];
s_player_combi set [count s_player_combi,_combi];
};
s_player_unlockvault = 1;
} else {
if (_characterID != dayz_combination && _ownerID != _uid) then {
_combi = player addAction [localize "STR_EPOCH_ACTIONS_RECOMBO", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true];
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
};
};
};
} else {
{player removeAction _x} count s_player_combi;s_player_combi = [];
s_player_unlockvault = -1;
};//Allow owner to pack vault
if ((_typeOfCursorTarget in DZE_UnLockedStorage) && {_characterID != "0"} && {player distance _cursorTarget < 3} && {!keypadCancel}) then {
if (s_player_lockvault < 0) then {
if (_characterID == dayz_combination || _ownerID == _uid) then {
s_player_lockvault = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\vault_lock.sqf",_cursorTarget, 0, false, true];
};
};
if (s_player_packvault < 0 && (_characterID == dayz_combination || _ownerID == _uid)) then {
s_player_packvault = player addAction [format["<t color='#ff0000'>%1</t>",(format[localize "STR_EPOCH_ACTIONS_PACK",_text])], "\z\addons\dayz_code\actions\vault_pack.sqf",_cursorTarget, 0, false, true];
};
} else {
player removeAction s_player_packvault;
s_player_packvault = -1;
player removeAction s_player_lockvault;
s_player_lockvault = -1;
};//Player Deaths
if (_typeOfCursorTarget == "Info_Board_EP1") then {
if (s_player_information < 0) then {
s_player_information = player addAction [localize "STR_EPOCH_ACTIONS_MURDERS", "\z\addons\dayz_code\actions\list_playerDeaths.sqf",[], 7, false, true];
};
} else {
player removeAction s_player_information;
s_player_information = -1;
};
//Fuel Pump
if (_typeOfCursorTarget in dayz_fuelpumparray) then {
if (s_player_fuelauto < 0) then {
// check if Generator_DZ is running within 30 meters
_findNearestGen = {((alive _x) && (_x getVariable ["GeneratorRunning",false]))} count (([player] call FNC_getPos) nearObjects ["Generator_DZ",30]);
// show that pump needs power if no generator nearby.
if (_findNearestGen > 0) then {
s_player_fuelauto = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",objNull, 0, false, true];
} else {
s_player_fuelauto = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true];
};
};
} else {
player removeAction s_player_fuelauto;
s_player_fuelauto = -1;
};//Fuel Pump on truck
if (_typeOfCursorTarget in DZE_fueltruckarray && _isAlive) then {
if (s_player_fuelauto2 < 0) then {
// show that fuel truck pump needs power.
if (isEngineOn _cursorTarget) then {
s_player_fuelauto2 = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",_cursorTarget, 0, false, true];
} else {
s_player_fuelauto2 = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true];
};
};
} else {
player removeAction s_player_fuelauto2;
s_player_fuelauto2 = -1;
};// inplace upgrade tool
if ((_cursorTarget isKindOf "ModularItems") || (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") || (_cursorTarget isKindOf "CinderWallDoor_DZ_Base")) then {
if ((s_player_lastTarget select 0) != _cursorTarget) then {
if (s_player_upgrade_build > 0) then {
player removeAction s_player_upgrade_build;
s_player_upgrade_build = -1;
};
};
if (s_player_upgrade_build < 0) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
_upgrade = getArray (configFile >> "CfgVehicles" >> (typeOf _cursorTarget) >> "upgradeBuilding");
if (((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) && (count _upgrade) > 0) then {
s_player_lastTarget set [0,_cursorTarget];
s_player_upgrade_build = player addAction [format[localize "STR_EPOCH_UPGRADE",_text], "\z\addons\dayz_code\actions\player_upgrade.sqf",_cursorTarget, -1, false, true];
};
};
} else {
player removeAction s_player_upgrade_build;
s_player_upgrade_build = -1;
};
// downgrade system
if (DZE_Lock_Door == _characterID && {!keypadCancel} && {_cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base"}) then {
if ((s_player_lastTarget select 1) != _cursorTarget) then {
if (s_player_downgrade_build > 0) then {
player removeAction s_player_downgrade_build;
s_player_downgrade_build = -1;
};
};
if (s_player_downgrade_build < 0) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then {
s_player_lastTarget set [1,_cursorTarget];
s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "\z\addons\dayz_code\actions\player_buildingDowngrade.sqf",_cursorTarget, -2, false, true];
};
};
} else {
player removeAction s_player_downgrade_build;
s_player_downgrade_build = -1;
};// inplace maintenance tool
if ((damage _cursorTarget >= DZE_DamageBeforeMaint) && {_cursorTarget isKindOf "ModularItems" || _cursorTarget isKindOf "DZE_Housebase" || _typeOfCursorTarget == "LightPole_DZ"}) then {
if ((s_player_lastTarget select 2) != _cursorTarget) then {
if (s_player_maint_build > 0) then {
player removeAction s_player_maint_build;
s_player_maint_build = -1;
};
};
if (s_player_maint_build < 0) then {
_hasAccess = [player, _cursorTarget] call FNC_check_access;
if ((_hasAccess select 0) or (_hasAccess select 2) or (_hasAccess select 3)) then {
_text2 = _text + " (" + str(round ((damage _cursorTarget) * 100)) + "% damaged)";
s_player_lastTarget set [2,_cursorTarget];
s_player_maint_build = player addAction [format["%1 %2",localize "STR_EPOCH_ACTIONS_MAINTAIN",_text2], "\z\addons\dayz_code\actions\player_buildingMaint.sqf",_cursorTarget, -2, false, true];
};
};
} else {
player removeAction s_player_maint_build;
s_player_maint_build = -1;
};//Start Generator
if (_isGenerator) then {
if (s_player_fillgen < 0) then {
// check if not running
if (_cursorTarget getVariable ["GeneratorRunning", false]) then {
s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR1", "\z\addons\dayz_code\actions\stopGenerator.sqf",_cursorTarget, 0, false, true];
} else {
// check if not filled and player has jerry.
if (_cursorTarget getVariable ["GeneratorFilled", false]) then {
s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR2", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true];
} else {
if (_hasFuel20 or _hasFuel5 or _hasBarrel) then {
s_player_fillgen = player addAction [localize "STR_EPOCH_ACTIONS_GENERATOR3", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true];
};
};
};
};
} else {
player removeAction s_player_fillgen;
s_player_fillgen = -1;
};//Towing with tow truck
/*
if(_typeOfCursorTarget == "TOW_DZE") then {
if (s_player_towing < 0) then {
if(!(_cursorTarget getVariable ["DZEinTow", false])) then {
s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true];
} else {
s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true];
};
};
} else {
player removeAction s_player_towing;
s_player_towing = -1;
};
*/
if (_isVehicle && {_characterID == "0"} && {"ItemKeyKit" in weapons player} && {!_isMan} && {_isAlive}) then {
if (s_player_claimVehicle < 0) then {
_totalKeys = call epoch_tempKeys;
if (count (_totalKeys select 0) > 0) then {
s_player_claimVehicle = player addAction [format["<t color='#0059FF'>%1</t>",format[localize "STR_CL_VKC_CLAIM_ACTION",_text]],"scripts\vkc\vehicleKeyChanger.sqf",[_cursorTarget,_characterID,"claim"],5,false,true];
};
};
} else {
player removeAction s_player_claimVehicle;
s_player_claimVehicle = -1;
};
// Take Clothes by Zabn
if (_isMan && {!_isAlive} && {!(_cursorTarget isKindOf "Animal")} && {!(_cursorTarget isKindOf "zZombie_base")} && {!(_cursorTarget getVariable["clothesTaken",false])}) then {
if (s_player_clothes < 0) then {
s_player_clothes = player addAction [format["<t color='#0059FF'>%1</t>",localize "STR_CL_TC_TAKE_CLOTHES"],"Custom\takeClothes.sqf",_cursorTarget,0, false,true];
};
} else {
player removeAction s_player_clothes;
s_player_clothes = -1;
};// 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;
};
if (dayz_tameDogs) then {
//Dog
_hasRawMeat = {_x in Dayz_meatraw} count _magazinesPlayer > 0;
if (_isDog && {_hasRawMeat} && {_isAlive} && {_ownerID == "0"} && {player getVariable ["dogID",0] == 0}) then {
if (s_player_tamedog < 0) then {
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\dog\tame_dog.sqf", _cursorTarget, 1, false, true];
};
} else {
player removeAction s_player_tamedog;
s_player_tamedog = -1;
};
if (_isDog && {_ownerID == _id} && {_isAlive}) then {
if (s_player_feeddog < 0 && _hasRawMeat) then {
s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true];
};
if (s_player_waterdog < 0 && _hasbottleitem) then {
s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true];
};
if (s_player_staydog < 0) then {
if (_dogHandle getFSMVariable "_actionLieDown") then { _text = "str_actions_liedog"; } else { _text = "str_actions_sitdog"; };
s_player_staydog = player addAction [localize _text,"\z\addons\dayz_code\actions\dog\stay.sqf", _dogHandle, 5, false, true];
};
if (s_player_trackdog < 0) then {
s_player_trackdog = player addAction [localize "str_actions_trackdog","\z\addons\dayz_code\actions\dog\track.sqf", _dogHandle, 4, false, true];
};
if (s_player_barkdog < 0) then {
s_player_barkdog = player addAction [localize "str_actions_barkdog","\z\addons\dayz_code\actions\dog\speak.sqf", _cursorTarget, 3, false, true];
};
if (s_player_warndog < 0) then {
_warn = _dogHandle getFSMVariable "_watchDog";
if (_warn) then { _text = localize "str_epoch_player_247"; _warn = false; } else { _text = localize "str_epoch_player_248"; _warn = true; };
s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true];
};
if (s_player_followdog < 0) then {
s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true];
};
} else {
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
};
};
} else {
//Engineering
player removeAction s_player_plot_boundary;
s_player_plot_boundary = -1;
player removeAction s_player_plotManagement;
s_player_plotManagement = -1;
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
player removeAction s_player_repair_crtl;
s_player_repair_crtl = -1;
dayz_myCursorTarget = objNull;
player removeAction s_player_flipveh;
s_player_flipveh = -1;
player removeAction s_player_sleep;
s_player_sleep = -1;
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
s_player_boil = -1;
player removeAction s_player_packtent;
s_player_packtent = -1;
player removeAction s_player_packtentinfected;
s_player_packtentinfected = -1;
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
player removeAction s_player_studybody;
s_player_studybody = -1;
//fuel
player removeAction s_player_fillfuel210;
s_player_fillfuel210 = -1;
player removeAction s_player_fillfuel20;
s_player_fillfuel20 = -1;
player removeAction s_player_fillfuel5;
s_player_fillfuel5 = -1;
//Allow player to siphon vehicle fuel
player removeAction s_player_siphonfuel;
s_player_siphonfuel = -1;
//Allow player to gather
player removeAction s_player_gather;
s_player_gather = -1;
player removeAction s_player_destroytent;
s_player_destroytent = -1;
// player removeAction s_player_attach_bomb;
// s_player_attach_bomb = -1;
player removeAction s_player_upgradestorage;
s_player_upgradestorage = -1;
/* //Unlock,Lock // Vanilla base building currently not used in Epoch
player removeAction s_player_setCode;
s_player_setCode = -1;
player removeAction s_player_lockhouse;
s_player_lockhouse = -1;
player removeAction s_player_unlockhouse;
s_player_unlockhouse = -1;
player removeAction s_player_openGate;
s_player_openGate = -1;
player removeAction s_player_CloseGate;
s_player_CloseGate = -1;
player removeAction s_player_breakinhouse;
s_player_breakinhouse = -1;
player removeAction s_player_BuildUnLock;
s_player_BuildUnLock = -1;
player removeAction s_player_BuildLock;
s_player_BuildLock = -1;*/
{player removeAction _x} count s_player_combi;s_player_combi = [];
s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
{player removeAction _x} count s_player_parts;s_player_parts = [];
s_player_parts_crtl = -1;
{player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
player removeAction s_player_SurrenderedGear;
s_player_SurrenderedGear = -1;
player removeAction s_player_maintain_area;
s_player_maintain_area = -1;
player removeAction s_player_maintain_area_force;
s_player_maintain_area_force = -1;
player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = -1;
player removeAction s_player_tamedog;
s_player_tamedog = -1;
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
player removeAction s_player_unlockvault;
s_player_unlockvault = -1;
player removeAction s_player_packvault;
s_player_packvault = -1;
player removeAction s_player_lockvault;
s_player_lockvault = -1;
player removeAction s_player_information;
s_player_information = -1;
player removeAction s_player_fillgen;
s_player_fillgen = -1;
player removeAction s_player_upgrade_build;
s_player_upgrade_build = -1;
player removeAction s_player_maint_build;
s_player_maint_build = -1;
player removeAction s_player_downgrade_build;
s_player_downgrade_build = -1;
player removeAction s_player_towing;
s_player_towing = -1;
player removeAction s_player_fuelauto;
s_player_fuelauto = -1;
player removeAction s_player_fuelauto2;
s_player_fuelauto2 = -1;
player removeAction s_player_manageDoor;
s_player_manageDoor = -1;
player removeAction s_player_copyToKey;
s_player_copyToKey = -1;
player removeAction s_player_claimVehicle;
s_player_claimVehicle = -1;
player removeAction s_player_clothes;
s_player_clothes = -1;
};//Dog actions on player self
if (_dogHandle > 0) then {
_dog = _dogHandle getFSMVariable "_dog";
if (isNil "_dog") exitWith {};
if (isNil "_ownerID") then {_ownerID = "0"};
if (_canDo && !_inVehicle && alive _dog && !(_ownerID in [_myCharID,_uid])) then {
if (s_player_movedog < 0) then {
s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID",0], 1, false, true];
};
if (s_player_speeddog < 0) then {
_text = localize "str_epoch_player_249";
_speed = 0;
if (_dog getVariable ["currentSpeed",1] == 0) then { _speed = 1; _text = localize "str_epoch_player_250"; };
s_player_speeddog = player addAction [format[localize "str_actions_speeddog", _text], "\z\addons\dayz_code\actions\dog\speed.sqf",[player getVariable ["dogID",0],_speed], 0, false, true];
};
if (s_player_calldog < 0) then {
s_player_calldog = player addAction [localize "str_actions_calldog", "\z\addons\dayz_code\actions\dog\follow.sqf", [player getVariable ["dogID",0], true], 2, false, true];
};
};
} else {
player removeAction s_player_movedog;
s_player_movedog = -1;
player removeAction s_player_speeddog;
s_player_speeddog = -1;
player removeAction s_player_calldog;
s_player_calldog = -1;
};//Monitor
player setVariable ["selfActions", diag_ticktime, false];
And in Variables.sqf
SpoilerdisableSerialization;
vkc_claimPrice = 2500; // Amount in worth for claiming a vehicle.
vkc_changePrice = 2500; // Amount in worth for changing the key for a vehicle.
vkc_clearAmmo = true; // Clear the ammo of vehicles after they have been rekeyed/claimed? (stops users getting a free rearm)
vkc_disableThermal = [""]; // Array of vehicle config classes as well as vehicle classnames to disable thermal on when being spawned. i.e: ["All","Land","Air","Ship","StaticWeapon","AH1Z","MTVR"];//Bloodsuckers
dzn_ns_bloodsucker = true; //Toggle bloodsuckers on and off.
dzn_ns_bloodsucker_den = 0.30; //Variable sets the spawn chance of bloodsuckers. Choose a number between 0 and 1. 0.25
ns_blowout = true;
ns_blowout_dayz = true;
ns_blow_delaymod = 0.74; //0.74
//AII
ns_aii_l_status = 1; //AII module light system: 0 = off, 1 = on.
ns_aii_l_intensity = 0.05; //Adjust the AII lighting intensity
//Model Variables
Bandit1_DZ = "Bandit1_DZ";
BanditW1_DZ = "BanditW1_DZ";
Survivor1_DZ = "Survivor1_DZ";
Survivor2_DZ = "Survivor2_DZ";
SurvivorW2_DZ = "SurvivorW2_DZ";
Sniper1_DZ = "Sniper1_DZ";
Camo1_DZ = "Camo1_DZ";
Soldier1_DZ = "Soldier1_DZ";
Rocket_DZ = "Rocket_DZ";
// EPOCH ADDITIONS
Bandit2_DZ = "Bandit2_DZ";
BanditW2_DZ = "BanditW2_DZ";
SurvivorW3_DZ = "SurvivorW2_DZ";//Rolling Msg system
Message_1 = "";
Message_2 = "";
Message_3 = "";
Message_1_time = 0;
Message_2_time = 0;
Message_3_time = 0;
//Kill Feed
death_1 = "";
death_2 = "";
death_3 = "";
death_4 = "";
death_1_time = 0;
death_2_time = 0;
death_3_time = 0;
death_4_time = 0;//OpenTarget timer
OpenTarget_Time = 0;///Player classes
AllPlayers = ["Sniper1W_DZN","CamoWinterW_DZN","CamoWinter_DZN","Survivor_DZ","Survivor1_DZ","SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","Bandit2_DZ","BanditW2_DZ","Soldier_Crew_PMC","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ","USMC_Soldier_Officer_DZ","USMC_Soldier_MG_DZ","USMC_Soldier_Pilot_DZ","FR_TL_DZ","FR_R_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","RU_Soldier_DZ","RU_Soldier_Officer_DZ","RUS_Soldier1_DZ","RUS_Commander_DZ","MVD_Soldier_DZ","Ins_Soldier_2_DZ","Ins_Commander_DZ","Ins_Soldier_Crew_DZ","CDF_Soldier_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","TK_INS_Soldier_AR_EP1_DZ","TK_GUE_Soldier_EP1_DZ","CZ_Soldier_SL_DES_EP1_DZ","US_Soldier_EP1_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","GER_Soldier_TL_EP1_DZ","BAF_Soldier_Officer_MTP_DZ","BAF_Soldier_N_MTP_DZ","FR_Sapper_DZ"];
DayZ_Male = ["Sniper1W_DZN","CamoWinterW_DZN","CamoWinter_DZN","Survivor_DZ","Survivor1_DZ","Survivor2_DZ","Survivor3_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","Bandit1_DZ","Bandit2_DZ","Soldier_Crew_PMC","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ","USMC_Soldier_Officer_DZ","USMC_Soldier_MG_DZ","USMC_Soldier_Pilot_DZ","FR_TL_DZ","FR_R_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","RU_Soldier_DZ","RU_Soldier_Officer_DZ","RUS_Soldier1_DZ","RUS_Commander_DZ","MVD_Soldier_DZ","Ins_Soldier_2_DZ","Ins_Commander_DZ","Ins_Soldier_Crew_DZ","CDF_Soldier_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","TK_INS_Soldier_AR_EP1_DZ","TK_GUE_Soldier_EP1_DZ","CZ_Soldier_SL_DES_EP1_DZ","US_Soldier_EP1_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","GER_Soldier_TL_EP1_DZ","BAF_Soldier_Officer_MTP_DZ","BAF_Soldier_N_MTP_DZ","FR_Sapper_DZ"];
DayZ_Female = ["Sniper1W_DZN","CamoWinterW_DZN","CamoWinter_DZN","SurvivorW2_DZ","BanditW1_DZ","BanditW2_DZ","SurvivorWcombat_DZ","SurvivorWurban_DZ","SurvivorWdesert_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ"];//Classnames for specific items
MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails","MeleeFishingPole","MeleeSledge"];
MeleeMagazines = ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing"];
MeleeAmmo = ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo","Bat_Swing_Ammo","BatBarbed_Swing_Ammo","BatNailed_Swing_Ammo","Fishing_Swing_Ammo","Sledge_Swing_Ammo","Chainsaw_Swing_Ammo"];
Dayz_fishingItems = ["MeleeFishingPole"];
Dayz_plants = ["Dayz_Plant1","Dayz_Plant2","Dayz_Plant3"];
Dayz_attachment_array = ["Attachment_ACG","Attachment_AIM"];
//DayZ_Tents = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4"]
//DayZ_Stashs = ["StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4"]
//DayZ_cutter = ["Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","CamoNet_DZ"]
DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_TerminalPack_EP1","DZ_CompactPack_EP1","DZ_GunBag_EP1","DZ_LargeGunBag_EP1"];
Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"];
DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"];
DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"];
DayZ_DropDrageeObjects = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","StickFence_DZ","SandNest_DZ","MetalPanel_DZ","WorkBench_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","WoodFloorHalf_DZ","WoodFloor_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","MetalFloor_DZ","WoodRamp_DZ"];
DayZ_GearedObjects = ["Car","Helicopter","Motorcycle","Ship","TentStorage_base","StashSmall_base","StashMedium_base","Plane","Tank","VaultStorage","LockboxStorage","TentStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ","Scaffolding_DZ","Generator_DZ"];
DayZ_RestingAnims = ["amovpsitmstpsnonwpstdnon_ground","amovpsitmstpsnonwpstdnon_smoking","amovpsitmstpsraswrfldnon_weaponcheck1","amovpsitmstpsraswrfldnon"];
dayz_typedBags = ["bloodTester","bloodBagANEG","bloodBagAPOS","bloodBagBNEG","bloodBagBPOS","bloodBagABNEG","bloodBagABPOS","bloodBagONEG","bloodBagOPOS","wholeBloodBagANEG","wholeBloodBagAPOS","wholeBloodBagBNEG","wholeBloodBagBPOS","wholeBloodBagABNEG","wholeBloodBagABPOS","wholeBloodBagONEG","wholeBloodBagOPOS"];
dayz_playerAchievements = []; //[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
dayz_plant = ["pumpkin.p3d","p_helianthus.p3d","p_fiberplant_ep1.p3d"];
dayz_trees = ["ind_timbers.p3d","t_picea2s_snow.p3d","b_corylus.p3d","t_quercus3s.p3d","t_larix3s.p3d","t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d","str habr.p3d","brg_bird_1.p3d","brg_bird_2.p3d","brg_bird_3.p3d","brg_umbrella_acacia02b.p3d","brg_africandoumpalm_1.p3d","brg_umbrella_acacia04b.p3d","brg_datepalm_4.p3d","brg_datepalm_1.p3d","brg_umbrella_acacia03b.p3d","brg_bottle_4.p3d","brg_aloe1.p3d","brg_umbrella_acacia03.p3d","brg_umbrella_acacia01.p3d","brg_umbrella_acacia04.p3d","brg_aloe2.p3d","brg_umbrella_acacia02.p3d","brg_aloe3.p3d","brg_bottle_1.p3d","brg_datepalm_3.p3d","brg_datepalm_2.p3d","brg_baobab_1.p3d","brg_bottle_2.p3d","brg_bottle_3.p3d","t_fraxinus2s.p3d","t_carpinus2s.p3d"];Dayz_meatraw =
[
"FoodBeefRaw",
"FoodMuttonRaw",
"FoodChickenRaw",
"FoodRabbitRaw",
"FoodBaconRaw",
"FoodGoatRaw",
"FoodDogRaw",
"FishRawTrout",
"FishRawSeaBass",
"FishRawTuna"
];Dayz_meatcooked =
[
"FoodBeefCooked",
"FoodMuttonCooked",
"FoodChickenCooked",
"FoodRabbitCooked",
"FoodBaconCooked",
"FoodGoatCooked",
"FoodDogCooked",
"FishCookedTrout",
"FishCookedSeaBass",
"FishCookedTuna"
];boil_tin_cans =
[
"TrashTinCan",
"FoodCanGriffEmpty",
"FoodCanBadguyEmpty",
"FoodCanBoneboyEmpty",
"FoodCanCornEmpty",
"FoodCanCurgonEmpty",
"FoodCanDemonEmpty",
"FoodCanFraggleosEmpty",
"FoodCanHerpyEmpty",
"FoodCanDerpyEmpty",
"FoodCanOrlokEmpty",
"FoodCanPowellEmpty",
"FoodCanTylersEmpty",
"FoodCanUnlabeledEmpty",
"FoodCanRusUnlabeledEmpty",
"FoodCanRusStewEmpty",
"FoodCanRusPorkEmpty",
"FoodCanRusPeasEmpty",
"FoodCanRusMilkEmpty",
"FoodCanRusCornEmpty",
"ItemSodaEmpty",
"ItemSodaClaysEmpty",
"ItemSodaDrwasteEmpty",
"ItemSodaFrankaEmpty",
"ItemSodaGrapeDrinkEmpty",
"ItemSodaLemonadeEmpty",
"ItemSodaLirikEmpty",
"ItemSodaLvgEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaMzlyEmpty",
"ItemSodaPeppsyEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaRabbitEmpty",
"ItemSodaRocketFuelEmpty",
"ItemSodaSacriteEmpty",
//"ItemSodaSherbetEmpty",
"ItemSodaSmashtEmpty",
"FoodCanPotatoesEmpty",
"FoodCanBeefEmpty"
];canPickup = false;
pickupInit = false;
mouseOverCarry = false; //for carry slot since determining mouse pos doesn't work right
dayZ_partClasses = ["PartFueltank","PartWheel","PartEngine"]; //No need to add PartGeneric, it is default for everything
dayZ_explosiveParts = ["palivo","motor"];
if (isNil "infectedWaterHoles") then {infectedWaterHoles = [];}; //Needed for non-cherno maps//Survival Variables
SleepFood = 2160; //minutes (48 hours)
SleepWater = 1440; //minutes (24 hours)
SleepTemperatur = 90 / 100; //First value = Minutes until player reaches the coldest point at night (without other effects! night factor expected to be -1) //TeeChange//Server Variables
allowConnection = false;
dayz_serverObjectMonitor = [];//GUI
Dayz_GUI_R = 0.38; // 0.7 .38
Dayz_GUI_G = 0.63; // -0.63
Dayz_GUI_B = 0.26; // -0.26//actions blockers
a_player_cooking = false;
a_player_boil = false;//Player self-action handles
dayz_resetSelfActions = {
s_player_equip_carry = -1;
s_player_fire = -1;
s_player_cook = -1;
s_player_boil = -1;
s_player_packtent = -1;
s_player_packtentinfected = -1;
s_player_fillfuel = -1;
s_player_grabflare = -1;
s_player_removeflare = -1;
s_player_studybody = -1;
s_player_deleteBuild = -1;
s_player_flipveh = -1;
s_player_sleep = -1;
s_player_fillfuel210 = -1;
s_player_fillfuel20 = -1;
s_player_fillfuel5 = -1;
s_player_siphonfuel = -1;
s_player_repair_crtl = -1;
s_player_fishing = -1;
s_player_fishing_veh = -1;
s_player_gather = -1;
s_player_destroytent = -1;
s_player_attach_bomb = -1;
s_player_upgradestorage = -1;
s_player_Drinkfromhands = -1;
/*s_player_lockhouse = -1; //Vanilla base building currently not used in Epoch
s_player_unlockhouse = -1;
s_player_openGate = -1;
s_player_CloseGate = -1;
s_player_breakinhouse = -1;
s_player_setCode = -1;
s_player_BuildUnLock = -1;
s_player_BuildLock = -1;*/
// EPOCH ADDITIONS
s_player_packvault = -1;
s_player_lockvault = -1;
s_player_unlockvault = -1;
s_player_attack = -1;
s_player_callzombies = -1;
s_player_showname = -1;
s_player_pzombiesattack = -1;
s_player_pzombiesvision = -1;
s_player_pzombiesfeed = -1;
s_player_tamedog = -1;
s_player_parts_crtl = -1;
s_player_movedog = -1;
s_player_speeddog = -1;
s_player_calldog = -1;
s_player_feeddog = -1;
s_player_waterdog = -1;
s_player_staydog = -1;
s_player_trackdog = -1;
s_player_barkdog = -1;
s_player_warndog = -1;
s_player_followdog = -1;
s_player_information = -1;
s_player_fuelauto = -1;
s_player_fuelauto2 = -1;
s_player_fillgen = -1;
s_player_upgrade_build = -1;
s_player_maint_build = -1;
s_player_downgrade_build = -1;
s_player_towing = -1;
s_halo_action = -1;
s_player_SurrenderedGear = -1;
s_player_maintain_area = -1;
s_player_maintain_area_force = -1;
s_player_maintain_area_preview = -1;
s_player_heli_lift = -1;
s_player_heli_detach = -1;
s_player_lockUnlock_crtl = -1;
s_player_lockUnlockInside_ctrl = -1;
s_player_toggleSnap = -1;
s_player_toggleSnapSelect = -1;
s_player_toggleSnapSelectPoint = [];
snapActions = -1;
s_player_plot_boundary = -1;
s_player_plotManagement = -1;
s_player_toggleDegree = -1;
s_player_toggleDegrees=[];
degreeActions = -1;
s_player_toggleVector = -1;
s_player_toggleVectors=[];
vectorActions = -1;
s_player_manageDoor = -1;
s_player_clothes = -1;
s_player_copyToKey = -1;
s_player_claimVehicle = -1;
};
call dayz_resetSelfActions;//Engineering variables
s_player_repairActions = [];//Initialize Medical Variables
force_dropBody = false;
r_interrupt = false;
r_doLoop = false;
r_drag_sqf = false;
r_action = false;
r_action_unload = false;
r_player_handler = false;
r_player_unconsciousInProgress = false;
r_player_unconsciousInputDisabled = false;
r_player_dead = false;
r_player_unconscious = false;
r_player_infected = false;
//infection from hits
r_player_Sepsis = [false, 0];
r_player_injured = false;
r_player_inpain = false;
r_player_loaded = false;
r_player_cardiac = false;
r_fracture_legs = false;
r_fracture_arms = false;
r_player_vehicle = player;
r_player_blood = 12000;
r_player_bloodregen = 0;
r_player_bloodgainpersec = 0;
r_player_bloodlosspersec = 0;
r_player_bloodpersec = 0; //Blood Per Sec (gain - loss)
r_player_foodstack = 1;
//player skill
r_player_lowblood = false;
r_player_timeout = 0;
r_player_bloodTotal = r_player_blood;
r_player_actions = [];
r_handlerCount = 0;
r_action_targets = [];
r_pitchWhine = false;
dayz_DisplayGenderSelect = true;
//blood test vars
r_A_watered = false;
r_B_watered = false;
r_D_watered = false;
r_control_watered = false;
r_canClick_resultsCard = false;
r_resultsCard_Clicked = false;
r_water_clicked = false;
r_needleclicked = 0;
r_needleReset = false;
r_control_done = false;
r_antiA_done = false;
r_antiB_done = false;
r_antiD_done = false;
carryClick = false;
dayz_actionInProgress = false;
gear_done = false;//player warming up vars
//heatpack
r_player_warming_heatpack = [false, 0];
r_player_warming_heatpack_time = 600;//displays temp progress
r_player_temp_factor = 0; //to be used for temp(up/down) indicators
r_player_temp_min_factor = -0.10; //(lvl3 down arrow)
r_player_temp_max_factor = 0.04; //(lvl3 up arrow)
//INT Nutrition Info
r_player_Nutrition = 0; // Calories
r_player_nutritionMuilpty = 2;//ammo routine
r_player_actions2 = [];
r_action2 = false;
r_player_lastVehicle = objNull;
r_player_lastSeat = [];
r_player_removeActions2 = {
if (!isNull r_player_lastVehicle) then {
{
r_player_lastVehicle removeAction _x;
} count r_player_actions2;
r_player_actions2 = [];
r_action2 = false;
};
};USEC_woundHit = ["","body","hands","legs","head_hit"]; // limbs hit given by arma engine when fnc_usec_damageHandler is called
DAYZ_woundHit = [["body","hands","legs","head_hit"],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]];
DAYZ_woundHit_ok = [["body","hands","legs"],[0,0,0,0,0,1,1,1,2,2]];
USEC_MinorWounds = ["hands","legs"];
USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes
["Pelvis","aimpoint"],
["aimpoint"], //,"RightShoulder","LeftShoulder"
["lelbow","relbow"],
["RightFoot","LeftFoot"],
["neck","pilot"]
];
USEC_typeOfWounds = [ // used by player_sumMedical, should contains all limbs described in USEC_woundPoint. These limbs statuses are saved by server_playerSync in HIVE if they are bleeding (medical select 8)
"Pelvis",
"aimpoint",
"lelbow","relbow",
"RightFoot","LeftFoot",
"neck","pilot"
];//Initialize Zombie Variables
dayz_zombieTargetList = [["SoldierWB",50],["Air",500],["LandVehicle",200]];
PVDZ_obj_Publish = []; // Used for eventhandler to spawn a mirror of players tent
PVCDZ_obj_HideBody = objNull;//DayZ settings
dayz_lastHumanityChange = diag_tickTime;
dayz_maxAnimals = 5;
dayz_maxPlants = 3;
dayz_animalDistance = 600;
dayz_plantDistance = 600;dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or alive) around players. Below this limit we can spawn Z // max quantity of loot piles around players. Below this limit we can spawn some loot
dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted
dayz_traps_active = [];
dayz_traps_trigger = [];//Settings Not under dayz_settings
if(isNil "dayz_attackRange") then {
dayz_attackRange = 3;
};
if(isNil "dayz_DamageMultiplier") then {
dayz_DamageMultiplier = 1;
};
if(isNil "dayz_quickSwitch") then {
dayz_quickSwitch = false; //Enable quick weapon switch,
};
//Will be moved to map
if(isNil "dayz_infectiouswaterholes") then {
dayz_infectiouswaterholes = true; //Enable infected waterholes
};
if(isNil "dayz_POIs") then {
dayz_POIs = true; //Enable POI's
};
if(isNil "dayz_ForcefullmoonNights") then {
dayz_ForcefullmoonNights = false; // Forces night time to be full moon.
};
if(isNil "dayz_randomMaxFuelAmount") then {
dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations.
};
if(isNil "dayz_townGenerator") then {
dayz_townGenerator = true; // Spawn map junk. Currently only compatible with Chernarus. Need to add coordinates for other maps.
};
if(isNil "dayz_townGeneratorBlackList") then {
dayz_townGeneratorBlackList = []; // Town generator will not spawn junk within 150m of these positions.
};//Replace server individual settings with ranked settings
if(isNil "dayz_presets") then { dayz_presets = "Vanilla"; };switch (dayz_presets) do {
case "Custom": { //Custom
if(isNil "dayz_enableGhosting") then { dayz_enableGhosting = false; };
if(isNil "dayz_ghostTimer") then { dayz_ghostTimer = 120; };
if(isNil "dayz_spawnselection") then { dayz_spawnselection = 0; };
if(isNil "dayz_spawncarepkgs_clutterCutter") then { dayz_spawncarepkgs_clutterCutter = 0; };
if(isNil "dayz_spawnCrashSite_clutterCutter") then { dayz_spawnCrashSite_clutterCutter = 0; };
if(isNil "dayz_spawnInfectedSite_clutterCutter") then { dayz_spawnInfectedSite_clutterCutter = 0; };
if(isNil "dayz_bleedingeffect") then { dayz_bleedingeffect = 2; };
if(isNil "dayz_OpenTarget_TimerTicks") then { dayz_OpenTarget_TimerTicks = 60 * 10; };
if(isNil "dayz_temperature_override") then { dayz_temperature_override = true; };
if(isNil "dayz_nutritionValuesSystem") then { dayz_nutritionValuesSystem = false; };
if(isNil "dayz_classicBloodBagSystem") then { dayz_classicBloodBagSystem = false; };
if(isNil "dayz_enableFlies") then { dayz_enableFlies = true; };
};
case "Classic": { //Classic
dayz_enableGhosting = false; //Enable disable the ghosting system.
dayz_ghostTimer = 120; //Sets how long in seconds a player must be dissconnected before being able to login again.
dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 2; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = true; // Set to true to disable all temperature changes.
dayz_nutritionValuesSystem = false; //Enables nutrition system
dayz_classicBloodBagSystem = true; //Enables one type of bloodbag
dayz_enableFlies = true; //Enables flies spawning on death
};
case "Elite": { //Elite
dayz_enableGhosting = true; //Enable disable the ghosting system.
dayz_ghostTimer = 90; //Sets how long in seconds a player must be dissconnected before being able to login again.
dayz_spawnselection = 0; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 25; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = false; // Set to true to disable all temperature changes.
dayz_nutritionValuesSystem = true; //Enables nutrition system
dayz_classicBloodBagSystem = false; //Enables one type of bloodbag
dayz_enableFlies = true; //Enables flies spawning on death
};
default { //Vanilla
dayz_enableGhosting = true; //Enable disable the ghosting system.
dayz_ghostTimer = 60; //Sets how long in seconds a player must be disconnected before being able to login again.
dayz_spawnselection = 1; //Turn on spawn selection 0 = random only spawns, 1 = Spawn choice based on limits
dayz_spawncarepkgs_clutterCutter = 0; //0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnCrashSite_clutterCutter = 0; // heli crash options 0 = loot hidden in grass, 1 = loot lifted and 2 = no grass
dayz_spawnInfectedSite_clutterCutter = 0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
dayz_bleedingeffect = 3; //1= blood on the ground, 2= partical effect, 3 = both.
dayz_OpenTarget_TimerTicks = 60 * 10; //how long can a player be freely attacked for after attacking someone unprovoked.
dayz_temperature_override = false; // Set to true to disable all temperature changes.
dayz_nutritionValuesSystem = true; //Enables nutrition system
dayz_classicBloodBagSystem = false; //Enables one type of bloodbag
dayz_enableFlies = true; //Enables flies spawning on death
};
};respawn_west_original = getMarkerPos "respawn_west"; //Prevent problems caused by cheaters moving respawn_west marker with setMarkerPos or deleteMarker
switch (toLower worldName) do {
case "napf";
case "ruegen";
case "sauerland" : {dayz_minpos = -1000; dayz_maxpos = 26000;};
case "tavi" : {dayz_minpos = -26000; dayz_maxpos = 26000;};
case "chernarus" : {dayz_minpos = -1; dayz_maxpos = 16000;};
case default {dayz_minpos = -20000; dayz_maxpos = 20000;};
};//start achievements_init
//call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\achievements_init.sqf";// EPOCH ADDITIONS
keypadCancel = false; //Brute force fix
keyPadReset = {uiSleep 2; keypadCancel = false;};
canbuild = true;
dayz_activeInvites = [];
dayz_combination = "";
dayz_disallowedVault = ["TentStorage","BuiltItems","ModularItems","DZE_Base_Object","Generator_DZ"];
// These work with just a running generator
dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_smd_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"];
dayz_humanitytarget = "";
dayz_selectedVault = objNull;
dayz_selectedDoor = objNull;
DAYZ_woundHit_dog = [["body","hands","legs"],[0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]];
DZE_fueltruckarray = ["KamazRefuel_DZ","UralRefuel_TK_EP1_DZ","MtvrRefuel_DES_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ","MtvrRefuel_DZ","KamazRefuel_DZE1","KamazRefuel_DZE2","KamazRefuel_DZE3","KamazRefuel_DZE4"];
DZE_Lock_Door = "";
DZE_HeliAllowTowFrom = ["CH_47F_EP1_DZE","CH_47F_EP1_DZ","CH_47F_BAF","CH_47F_EP1","BAF_Merlin_DZE","CH53_DZE"];
DZE_HeliAllowToTow = ["hilux1_civil_1_open","HMMWV_Base","Lada_base","Offroad_DSHKM_base","Pickup_PK_base","SkodaBase","tractor","VWGolf","Volha_TK_CIV_Base_EP1","S1203_TK_CIV_EP1","SUV_Base_EP1","ArmoredSUV_Base_PMC","UAZ_Base","LandRover_Base","Ship"];
DZE_REPLACE_WEAPONS = [["Crossbow","DMR","M14_EP1","SVD","SVD_CAMO"],["Crossbow_DZ","DMR_DZ","M14_CCO_DZ","SVD_DZ","SVD_Gh_DZ"]];
DZE_replaceMagazines = [["vil_20Rnd_762x51_G3"],["vil_20Rnd_762x51_G3"]];
DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"];
DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"];
DZE_UnLockedStorage = ["VaultStorage","LockboxStorage"];
DZE_maintainClasses = ["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Generator_DZ","DZ_buildables","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ","M240Nest_DZ"];
DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"];
DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck","Land_ammo_supply_wreck"];
DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"];
DZE_isDestroyableStorage = ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"];
DZE_itemKeys = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
DZE_keyColors = ["Green","Red","Blue","Yellow","Black"];
helperDetach = false;
DZE_snapExtraRange = 0;
DZE_tradeVehicle = ["trade_any_vehicle","trade_any_vehicle_free","trade_any_vehicle_old","trade_any_bicycle","trade_any_bicycle_old","trade_any_boat","trade_any_boat_old"];
DZE_tradeVehicleKeyless = ["trade_any_bicycle","trade_any_bicycle_old","trade_any_vehicle_free"];
DZE_tradeObject = DZE_tradeVehicle + ["trade_backpacks"];
DZE_GearCheckBypass = false;
isInTraderCity = false;
inTraderCity = "Unknown Trader";
PlayerDeaths = [];
PVDZE_obj_Trade = []; // For all traders increment qty
PVDZE_plr_DeathB = [];
if (!DZE_ConfigTrader) then {
PVDZE_plr_TradeMenu = []; // For all traders
};
snapGizmos = [];
snapGizmosNearby = [];
s_player_combi = [];
s_player_lockunlock = [];
s_player_lockUnlockInside = [];
s_player_parts = [];
if (isNil "DZE_GodModeBase") then {DZE_GodModeBase = false;};
if (isNil "dayz_paraSpawn") then {dayz_paraSpawn = false;};
if (isNil "DZE_BuildingLimit") then {DZE_BuildingLimit = 150;};
if (isNil "DZE_BuildOnRoads") then {DZE_BuildOnRoads = false;};
if (isNil "DZE_SelfTransfuse") then {DZE_SelfTransfuse = false;};
if (isNil "DZE_selfTransfuse_Values") then {DZE_selfTransfuse_Values = [12000,15,120];};
if (isNil "DZE_PlotPole") then {DZE_PlotPole = [30,45];};
DZE_maintainRange = ((DZE_PlotPole select 0)+20);if (isServer) then {
dayz_serverPUIDArray = [];
dayz_serverClientKeys = [];
dayz_traps = [];
dead_bodyCleanup = [];
needUpdate_objects = [];
needUpdate_FenceObjects = [];
//dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
//Objects to remove when killed.
DayZ_nonCollide = ["TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3", "StashMedium4", "DomeTentStorage", "DomeTentStorage0", "DomeTentStorage1", "DomeTentStorage2", "DomeTentStorage3", "DomeTentStorage4", "CamoNet_DZ", "DesertTentStorage", "DesertTentStorage0", "DesertTentStorage1", "DesertTentStorage2", "DomeTentStorage3", "DesertTentStorage4"];
DayZ_WoodenFence = ["WoodenFence_1","WoodenFence_2","WoodenFence_3","WoodenFence_4","WoodenFence_5","WoodenFence_6","WoodenFence_7"];
DayZ_WoodenGates = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4"];
DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"];
//[10416.695, 4198.4634],[7982.2563, 1419.8256],[10795.93, 1419.8263],[7966.083, 4088.7463],[9259.7266, 2746.1985],[5200.5234, 3915.3274],[6494.1665, 2572.7798],[5216.6968, 1246.407],[2564.7244, 3915.3296],[3858.3674, 2572.782],[2580.8977, 1246.4092],[13398.995, 4400.5874],[12242.025, 2948.3196],[13551.842, 1832.2257],[14870.512, 3009.5117],[-178.19415, 1062.4478],[1099.2754, 2388.8206],[-194.36755, 3731.3679],[10394.215, 8322.1719],[7959.7759, 5543.5342],[10773.449, 5543.5342],
dayz_grid =[[7943.6025, 8212.4551],[9237.2461, 6869.9063],[5178.043, 8039.0361],[6471.686, 6696.4883],[5194.2163, 5370.1152],[2542.2439, 8039.0381],[3835.887, 6696.4902],[2558.4172, 5370.1172],[13376.514, 8524.2969],[12219.544, 7072.0273],[13529.361, 5955.9336],[14848.032, 7133.2197],[-200.67474, 5186.1563],[1076.7949, 6512.5283],[-216.84814, 7855.0771],[10293.751, 12197.736],[7859.312, 9419.0996],[10672.988, 9419.0996],[7843.1387, 12088.021],[9136.7822, 10745.474],[5077.5791, 11914.601],[6371.2222, 10572.052],[5093.7524, 9245.6816],[2441.78, 11914.604],[3735.4231, 10572.055],[2457.9534, 9245.6816],[13276.053, 12399.861],[12119.08, 10947.596],[13428.897, 9831.501],[14747.566, 11008.786],[-301.13867, 9061.7207],[976.33112, 10388.096],[-317.31201, 11730.642],[10271.271, 16321.429],[7836.8315, 13542.813],[10650.506, 13542.813],[7820.6582, 16211.718],[9114.3018, 14869.175],[5055.0986, 16038.3],[6348.7417, 14695.758],[5071.272, 13369.392],[2419.2996, 16038.305],[3712.9426, 14695.76],[2435.4729, 13369.392],[13253.568, 16523.553],[12096.6, 15071.295],[13406.416, 13955.209],[14725.089, 15132.486],[-323.61914, 13185.43],[953.85059, 14511.8],[-339.79248, 15854.346]];
dayz_choppedTrees = [];
dayz_ghostPlayers = [];
dayz_activePlayers = [];
dayz_died = [];// EPOCH ADDITIONS
DZE_safeVehicle = ["ParachuteWest","ParachuteC","Old_bike_TK_CIV_EP1","TT650_Civ","CSJ_GyroC"];
if (isNil "EpochUseEvents") then {EpochUseEvents = false;};
if (isNil "EpochEvents") then {EpochEvents = [];};
if (isNil "MaxDynamicDebris") then {MaxDynamicDebris = 100;};
if (isNil "MaxVehicleLimit") then {MaxVehicleLimit = 50;};
if (isNil "spawnArea") then {spawnArea = 1400;};
if (isNil "spawnShoremode") then {spawnShoremode = 1;};
};if (!isDedicated) then {
dayz_authKey = "";
DZE_LastPingResp = diag_tickTime;
dayz_buildingBubbleMonitor = [];
DayZ_fuelCans = ["ItemJerrycan","ItemFuelcan","ItemFuelBarrel"];
DayZ_fuelCansEmpty = ["ItemJerrycanEmpty","ItemFuelcanEmpty","ItemFuelBarrelEmpty"];
DayZ_fuelSources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","Land_smd_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"];
dayz_plantOutput = ["FoodPumpkin","FoodSunFlowerSeed","ItemKiloHemp"];
dayz_plantTypes = ["","MAP_pumpkin","MAP_p_Helianthus","fiberplant"];
//Needed for trees spawned with createVehicle like POI (typeOf returns class instead of "")
dayz_treeTypes = ["","MAP_t_picea1s","MAP_t_picea2s","MAP_t_picea3f","MAP_t_pinusN2s","MAP_t_pinusS2f","MAP_t_populus3s","MAP_t_betula2s","MAP_t_fagus2s","MAP_t_fagus2W","MAP_t_malus1s"];
//temperature variables
dayz_temperatur = 25; //TeeChange
dayz_temperaturnormal = 25; //TeeChange
dayz_temperaturmax = 40; //TeeChange from 30
dayz_temperaturmin = 15; //TeeChange//player special variables
dayz_bloodBagHumanity = 300;
dayz_HarvestingChance = [0.09];
dayz_lastCheckBit = 0;
dayz_lastDamageSourceNull = false;
dayz_lastDamageSource = "none";
dayz_lastDamageTime = 0;
dayz_lastMedicalSource = "none";
dayz_lastMedicalTime = 0;
dayz_lastClothesChange = 0;
dayZ_lastPlayerUpdate = 0;
dayz_lastSelfTransfusion = -(DZE_selfTransfuse_Values select 2);
dayz_lastTransfusion = 0;
dayz_playerName = "unknown";
dayz_hunger = 0;
dayz_thirst = 0;
dayz_nutrition = 0;
dayz_preloadFinished = true;
dayz_soundMuted = false;
dayz_disAudial = 0;
dayz_disVisual = 0;
dayz_firedCooldown = 0;
dayz_damageCounter = time;
dayz_lastSave = diag_tickTime;
dayz_isSwimming = true;
dayz_currentDay = 0;
dayz_hasLight = false;
dayz_surfaceNoise = 0;
dayz_surfaceType = "None";
dayz_noPenalty = [];
dayz_heavenCooldown = 0;
deathHandled = false;
dayz_firstGroup = group player;
dayz_originalPlayer = player;
dayz_sourceBleeding = objNull;
dayz_clientPreload = false;
dayz_authed = false;
dayz_panicCooldown = 0;
dayz_areaAffect = 3.5;
dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls
dayz_heartBeat = false;
dayz_spawnZombies = 0; // Current local
dayz_swarmSpawnZombies = 0;
dayz_maxLocalZombies = 15; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
dayz_CurrentNearByZombies = 0;
dayz_maxNearByZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
dayz_currentGlobalZombies = 0; // Current total
if(isNil "dayz_maxGlobalZeds") then {
dayz_maxGlobalZeds = 1000;
};
//Animals
dayz_currentGlobalAnimals = 0;
dayz_maxGlobalAnimals = 50;
//Plants
dayz_currentGlobalPlants = 0;
dayz_maxGlobalPlants = 500;
//Loot
r_player_divideinvehicle = 0;
dayz_currentWeaponHolders = 0;
dayz_maxMaxWeaponHolders = 80;
dayz_inVehicle = false;
dayz_unsaved = false;
dayz_scaleLight = 0;
dayz_onBack = "";
dayz_fishingInprogress = false;
lastSpawned = diag_tickTime;
lastSepsis = 0;
NORRN_dropAction = -1;
dayz_dodge = false;
Dayz_constructionContext = [];
Dayz_freefall = [ time, 0, 0.1 ];
dayz_getoutTime = 0;
dayz_hitByTime = 0;
skipGearSound = false;
TimeOutDisplayed = false;
playerHumanityCHK = 0;
voice_actions = ["voiceOverNet","PushToTalk","PushToTalkAll","PushToTalkCommand","PushToTalkDirect","PushToTalkGroup","PushToTalkSide","PushToTalkVehicle"];// EPOCH ADDITIONS
s_player_lastTarget = objNull;
if (isNil "DZE_BackpackAntiTheft") then {DZE_BackpackAntiTheft = false;};
if (isNil "DZE_requireplot") then {DZE_requireplot = 1;};
if (isNil "DZE_StaticConstructionCount") then {DZE_StaticConstructionCount = 0;};
if (toLower DZE_DeathMsgChat in ["global","side"]) then {enableRadio true;}; //Needed for scripted global chat to show, doesn't seem to have any adverse effects
dayz_autoRun = false;
DZE_AntiWallCounter = 0;
DZE_myHaloVehicle = objNull;
dayz_myLiftVehicle = objNull;
DZE_Friends = [];
DZE_Q = false;
DZE_Z = false;
DZE_Q_alt = false;
DZE_Z_alt = false;
DZE_Q_ctrl = false;
DZE_Z_ctrl = false;
DZE_4 = false;
DZE_5 = false;
DZE_6 = false;
DZE_F = false;
DZE_cancelBuilding = false;
DZE_TEMP_treedmg = 1;
DZE_Surrender = false;
DZE_Quarantine = false;
DZE_InRadiationZone = false;
DZE_myVehicle = objNull;
dayz_groupNameTags = (profileNamespace getVariable ["streamerMode",0] == 0); //If streamer mode is on then hide name tags at startup. Toggle with Windows key.
dayz_minusDownTime = 0;
dayz_lastCodeFail = 0;
};
Iv also added your server_publishVehicle3.sqf to the server pbo
Go easy on me im just a stoner with a keyboard. My first thoughts where to check the variable is defined but i didn't see anything wrong with that, its defined at the top in the private array,Iv read though every release thread and dont see anyone else mention of this issue so im convinced i screwed up somewhere. :(
Edit-
Problem resolved took me a while but i got it,
Spoilerif (s_player_lockUnlock_crtl < 0) then {
_oldOwner = (_characterID == _uid);
if (_isLocked) then {
if (_hasKey || {_oldOwner}) then {
_temp_key_name = (_temp_keys_names select (_temp_keys find _characterID));
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,_temp_key_name], 2, true, true];
s_player_lockunlock set [count s_player_lockunlock,_unlock];
s_player_lockUnlock_crtl = 1;
} else {
if (_hasHotwireKit) then {
_unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_HOTWIRE",_text], "\z\addons\dayz_code\actions\hotwire_veh.sqf",_cursorTarget, 2, true, true];
} else {
_unlock = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_VEHLOCKED"], "",_cursorTarget, 2, false, true];
};
s_player_lockunlock set [count s_player_lockunlock,_unlock];
s_player_lockUnlock_crtl = 1;
};
} else {
if (_hasKey || _oldOwner) then {
_lock = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true];
s_player_lockunlock set [count s_player_lockunlock,_lock];
s_player_lockUnlock_crtl = 1;
};
};
}; -
This is really fab and playing with it taught me so much about dialog menus etc. Big thanks for sharing it and it is still working on 1.0.6.2 but after reading though the files some more I found that keyboard.sqf has been updated since 1.0.6.1 so I updated the new keyboard.sqf to the latest version for anyone else anal like me here is a copy of the 1.0.6.2 keyboard.sqf with thedukes changes for his menu/mod
Spoiler// (c) [email protected], licensed to DayZMod for the community
#include "\ca\editor\Data\Scripts\dikCodes.h"
_dikCode = _this select 1;
_shiftState = _this select 2;
_ctrlState = _this select 3;
_altState = _this select 4;
_handled = false;if (isNil "keyboard_keys") then {
_cancelBuild = {
DZE_cancelBuilding = true;
call dayz_EjectPlayer;
_handled = false;
if (r_player_dead) then {_handled = true;}; // Disable ESC after death
};
_dze_f = {
if (!_ctrlState && !_altState) then {DZE_F = true;};
};
_dze_q = {
if (!_ctrlState && !_altState) then {DZE_Q = true;};
if (!_ctrlState && _altState) then {DZE_Q_alt = true;};
if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;};
};
_dze_z = {
if (!_ctrlState && !_altState) then {DZE_Z = true;};
if (!_ctrlState && _altState) then {DZE_Z_alt = true;};
if (_ctrlState && !_altState) then {DZE_Z_ctrl = true;};
};
_autoRun = {
if (!dayz_autoRun) then {
dayz_autoRun = true;
dayz_autoRunThread = [] spawn {
_weapon = currentWeapon player;
while {dayz_autoRun} do {
// SurfaceIsWater does not work for ponds
// Check weapon to detect Arma action (dayz action is handled in dz_fn_switchWeapon)
if (player != vehicle player or (surfaceIsWater getPosASL player) or ((call fn_nearWaterHole) select 0) or (currentWeapon player != _weapon) or r_fracture_legs) exitWith {
call dayz_autoRunOff;
};
player playAction "FastF";
uiSleep 0.5;
};
};
} else {
call dayz_autoRunOff;
};
_handled = true;
};
_filterCheat = {
//Overriding default engine handling does not stop cheat input, need manual disableUserInput too
_handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
};
_openGroups = {
if (dayz_requireRadio && !("ItemRadio" in items player)) then {
localize "STR_EPOCH_NEED_RADIO" call dayz_rollingMessages;
} else {
if (isNull findDisplay 80000) then {
if (!isNil "dayz_groupInit") then {[] spawn dayz_openGroupDialog;};
} else {
findDisplay 80000 closeDisplay 2;
};
};
_handled = true;
};
_muteSound = {
call player_toggleSoundMute;
_handled = true;
};
_rifle = {
2 call dz_fn_switchWeapon;
_handled = true;
};
_pistol = {
3 call dz_fn_switchWeapon;
_handled = true;
};
_melee = { // Also works for rifle on back if DZE_TwoPrimaries = 2;
4 call dz_fn_switchWeapon;
_handled = true;
};
_throwable = { // select next non empty throwable weapon
if (vehicle player == player) then {
_ammo_throwable = [];
_muzzles_throwable = [];
_weapon_throwable = [];
{
_weapon = _x;
_muzzles = getArray(configFile >> "cfgWeapons" >> _weapon >> "muzzles");
if (count _muzzles == 0) then { _muzzles = [_weapon ]; };
{
_muzz = _x;
{
if (_x in magazines player) then {
_ammo_throwable set [ count _ammo_throwable, getText(configFile >> "cfgMagazines" >> _x >> "ammo") ];
_muzzles_throwable set [ count _muzzles_throwable, _muzz ];
_weapon_throwable set [ count _weapon_throwable, _weapon ];
};
} forEach getArray(configFile >> "cfgWeapons" >> _weapon >> _muzz >> "magazines");
} forEach _muzzles;
} forEach ["Throw"];_magCount = count _ammo_throwable;
if (_magCount > 0) then {
if (isNil "KB_CurrentThrowable") then { KB_CurrentThrowable = -1; };
_currentAmmo = (weaponState player) select 3;
_idx = _ammo_throwable find _currentAmmo;
if (_idx >= 0) then { KB_CurrentThrowable = _idx; };
KB_CurrentThrowable = (KB_CurrentThrowable + 1) mod _magCount;
player selectWeapon (_muzzles_throwable select KB_CurrentThrowable);
_handled = true;
};
};
};
_surrender = {
call player_surrender;
_handled = true;
};
_gear = {
if ((vehicle player != player) and !_shiftState and !_ctrlState and !_altState && !dialog) then {
createGearDialog [player, "RscDisplayGear"];
_handled = true;
}
else { if ((vehicle player == player) and (speed vehicle player > 0)) then {
//[objNull, player, rSwitchMove,""] call RE;
_handled = true;
};};
};
_forcesave = {
dayz_lastCheckBit = diag_ticktime;
call player_forceSave;
call dayz_EjectPlayer;
};
_forcesave2 = {
if ((!isNull (findDisplay 106)) OR dialog) then {
call player_forceSave;
};
};
_drop = {
if (r_drag_sqf) then {
_doors = nearestObjects [player, DayZ_DropDrageeObjects, 3]; //Prevent dropping dragged player through objects
if (count _doors > 0) then {_handled = true;};
force_dropBody = true;
} else {
_doors = nearestObjects [player, DZE_DoorsLocked, 3];
if (count _doors > 0 && {speed player > 0}) then {_handled = true;}; //Prevent sprint and prone through doors glitch
};
};
_interrupt = {
if (vehicle player == player) then { //allow med actions in moving vehicles
r_interrupt = true;
};
if (DZE_Surrender) then {call dze_surrender_off};
if (dayz_autoRun) then {call dayz_autoRunOff;};
};
// TODO: left/right, when gear open: onKeyDown = "[_this,'onKeyDown',0,107,0,107] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
_noise = {
//Overriding default engine handling does not stop combination binds, need manual disableUserInput too
_handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
if (diag_ticktime - dayz_lastCheckBit > 10 && !(_dikCode in channel_keys)) then {
dayz_lastCheckBit = diag_ticktime;
[player,20,true,(getPosATL player)] call player_alertZombies;
};
};
_journal = {
if (!dayz_isSwimming and !dialog) then {
[player,4,true,(getPosATL player)] call player_alertZombies;
createDialog 'horde_journal_front_cover';
};
_handled = true;
};_build_left = {
DZE_4 = true;
// fence construction
if (0 != count Dayz_constructionContext) then {
_angleRef = Dayz_constructionContext select 1;
_dir = _angleRef - (getDir player) -5;
if (_dir > 180) then {_dir = _dir - 360};
if (_dir < -180) then {_dir = _dir + 360};
if ( _dir > -75) then {
_new = floor((_angleRef - 5)/5)*5;
Dayz_constructionContext set [ 1, _new]; // favorite angle
r_interrupt = true;
};
_handled = true;
};
// tents and stash construction
_object = player getVariable ["constructionObject", objNull];
if (!isNull _object) then {
_dir = getDir _object - 3;
_object setDir _dir;
_handled = true;
};
dayz_dodge = true;
};
_build_right = {
DZE_6 = true;
if (0 != count Dayz_constructionContext) then {
_angleRef = Dayz_constructionContext select 1;
_dir = _angleRef - (getDir player) +5;
if (_dir > 180) then { _dir = _dir - 360; };
if (_dir < -180) then { _dir = _dir + 360; };
if (_dir < 75) then {
_new = ceil((_angleRef + 5)/5)*5;
Dayz_constructionContext set [ 1, _new]; // favorite angle
r_interrupt = true;
};
_handled = true;
};
// tents and stash construction
_object = player getVariable ["constructionObject", objNull];
if (!isNull _object) then {
_dir = getDir _object + 3;
_object setDir _dir;
_handled = true;
};
dayz_dodge = true;
};_build_camOnOff = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildCamera.sqf";
_build_str8OnOff = {
if (0 != count Dayz_constructionContext) then {
Dayz_constructionContext set [ 5, !(Dayz_constructionContext select 5) ];
_handled = true;
r_interrupt = true;
};
if (animationState player in ["bunnyhopunarmed","bunnyhoprifle"]) then {
//Fixes invisible weapon switch glitch if double tapping vault with no weapon in hands
_handled = true;
};
if (player isKindOf "PZombie_VB") then {
_handled = true; // do not allow player zombies to vault or jump
} else {
_nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8];
if (count _nearbyObjects > 0) then {
if ((diag_tickTime - dayz_lastCheckBit > 4)) then {
[objNull, player, rSwitchMove,"GetOver"] call RE;
player playActionNow "GetOver";
dayz_lastCheckBit = diag_tickTime;
} else {
_handled = true;
};
};
};
};
//ESLKESLK Menu
_informenu = {if (isNull findDisplay 7777) then {
execVM "Custom\menu\menu_init.sqf";
};
_handled = true;
};
_block = {
_handled = true;
};
_addArray = {
{
keyboard_keys set [_x, _this select 1];
} forEach (_this select 0);
};keyboard_keys = [];
channel_keys = [];
voice_keys = [];
{voice_keys = voice_keys + (actionKeys _x)} count voice_actions;
{channel_keys = channel_keys + (actionKeys _x)} count ["NextChannel","PrevChannel"];
keyboard_keys resize 256;
[[DIK_TAB], _informenu] call _addArray;
[[DIK_ESCAPE], _cancelBuild] call _addArray;
[[DIK_INSERT], {DZE_Q_alt = true;}] call _addArray;
[[DIK_A,DIK_D,DIK_LEFT,DIK_RIGHT], _interrupt] call _addArray;
[[DIK_F], _dze_f] call _addArray;
[[DIK_PRIOR], _dze_q] call _addArray;
[[DIK_NEXT], _dze_z] call _addArray;
[[DIK_Q], {DZE_4 = true;}] call _addArray;
[[DIK_E], {DZE_6 = true;}] call _addArray;
[[DIK_0], _autoRun] call _addArray;
[[DIK_NUMPADMINUS,DIK_LSHIFT], _filterCheat] call _addArray;
[[DIK_SPACE], {DZE_5 = true;}] call _addArray;
[actionKeys "User6", {DZE_F = true;}] call _addArray;
[actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray;
[actionKeys "User8", {DZE_Z_ctrl = true;}] call _addArray;
[actionKeys "User13", {DZE_Q_alt = true;}] call _addArray;
[actionKeys "User14", {DZE_Z_alt = true;}] call _addArray;
[actionKeys "User15", {DZE_Q = true;}] call _addArray;
[actionKeys "User16", {DZE_Z = true;}] call _addArray;
[actionKeys "User17", {DZE_4 = true;}] call _addArray;
[actionKeys "User18", {DZE_6 = true;}] call _addArray;
[actionKeys "User19", {DZE_5 = true;}] call _addArray;
[actionKeys "Surrender", _surrender] call _addArray;
[[DIK_1], _rifle] call _addArray;
[[DIK_2], _pistol] call _addArray;
[[DIK_3], _melee] call _addArray;
//[[DIK_4], _throwable] call _addArray;
[actionKeys "Gear", _gear] call _addArray;
[actionKeys "Prone", _drop] call _addArray;
[actionKeys "Crouch", _drop] call _addArray;
[actionKeys "MoveLeft", _interrupt] call _addArray;
[actionKeys "MoveRight", _interrupt] call _addArray;
[actionKeys "MoveForward", _interrupt] call _addArray;
[actionKeys "MoveBack", _interrupt] call _addArray;
[actionKeys "TurnLeft", _interrupt] call _addArray;
[actionKeys "TurnRight", _interrupt] call _addArray;
[actionKeys "PushToTalk", _noise] call _addArray;
[actionKeys "PushToTalkAll", _noise] call _addArray;
[actionKeys "PushToTalkCommand", _noise] call _addArray;
[actionKeys "PushToTalkDirect", _noise] call _addArray;
[actionKeys "PushToTalkGroup", _noise] call _addArray;
[actionKeys "PushToTalkSide", _noise] call _addArray;
[actionKeys "PushToTalkVehicle", _noise] call _addArray;
[actionKeys "VoiceOverNet", _noise] call _addArray;
[actionKeys "NextChannel", _noise] call _addArray;
[actionKeys "PrevChannel", _noise] call _addArray;
[actionKeys "Chat", _noise] call _addArray;
[actionKeys "User20", _journal] call _addArray;
[actionKeys "Diary", _journal] call _addArray;
[actionKeys "NetworkStats", _journal] call _addArray;
[[DIK_F1], _muteSound] call _addArray;
//[[DIK_F4, DIK_TAB, DIK_DELETE], _forcesave] call _addArray;
//[[DIK_F4, DIK_RMENU, DIK_LMENU,DIK_LSHIFT,DIK_RSHIFT,DIK_ESCAPE], _forcesave2] call _addArray;
[actionKeys "LeanLeft", _build_left ] call _addArray;
[actionKeys "LeanRight", _build_right ] call _addArray;
[actionKeys "PersonView", _build_camOnOff ] call _addArray; // Camera Mode
[actionKeys "GetOver", _build_str8OnOff ] call _addArray; // V
// [[DIK_NUMPAD7], _rotate_left] call _addArray;
// [[DIK_NUMPAD9], _rotate_right] call _addArray;
[actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
[[ DIK_F9,DIK_F10,DIK_F11,DIK_F12,
DIK_F8,DIK_F7,DIK_F6,DIK_F5,DIK_F4,
DIK_F3,DIK_F2,DIK_9,
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4], _block] call _addArray;
if (dayz_groupSystem) then {
[[DIK_F5], _openGroups] call _addArray;
[[DIK_LWIN,DIK_RWIN], {dayz_groupNameTags = !dayz_groupNameTags;_handled = true;}] call _addArray;
[actionKeys "TacticalView", _block] call _addArray;
};
diag_log "keyboard_keys reset";
if (!isNil "bis_fnc_halo_keydown_eh") then {bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];}; // halo in progress
};if (r_player_unconsciousInputDisabled) exitWith {true};
_code = keyboard_keys select _dikCode;
if (!isNil "_code") then {
call _code;
};_handled
-
Thanks for all the mods, cant wait to get into them all. I know the vehicle key changer mod will make them happy.
-
On 5/20/2017 at 3:29 PM, JasonTM said:
I think I still have an old 1.0.5.1 Namalsk server on my LAN server. I'll test that sometime this week and see if the same thing happens.
BTW, I also noticed that there is an error in the client RPT.
Error in expression <{ _jednotka = AllUnits select _c; if (!(_jednotka hasWeapon "APSI") && (Alive _j> Error position: <_jednotka hasWeapon "APSI") && (Alive _j> Error Undefined variable in expression: _jednotka File nst\ns_modules\blowout\module\blowout_client.sqf, line 77
I think that variable should have been declared as private. It doesn't appear to break anything but having RPT errors is annoying.
Did you ever figure that one out. I'm doing my best to get a clean client log but this one is getting to me even when its just a passive error it bugs me so much. Iv already pulled the files over to my mission to play about with it.
-
Hey guys thanks for all the replies and great tips, sorry I couldn't reply sooner, work has been crazy today.
Thanks for the class name too. I hope I'm allowed to raise the spawns though :P
-
"rebreathe" lol that's an awesome name for it hahaha
Ok thanks dude, I was also looking through the menu but could not find them. Has anyone been able to spawn the sub and Oxygen equipment using the menu?
-
So after hosting a server since day 1 I have today finally had the time to play it. :lol:
Whilst playing I noticed some icons out in the ocean on the map, so curiosity and all that I decided to go investigate with a friend. We finally arrive to find nothing and discover its actually a ship-wreck on the sea bed. :huh:
After looking everywhere I finally got a wet-suit but we are unable to find both a submarine and gear to help us breath underwater. So I opted to check the cheat menu. I could not find a submarine or any breathing masks to be spawned in or on any of the vehicle map markers.
Can anyone tell me if the sub is suppose to spawn with all the other dynamic vehicles on the map? Also the same goes for the breathing gear? If you have the class names of them to that would be an extra help as I have other plans for those.
Perhaps I am mistaken and these items are not included in epoch A3 but after searching around forums etc it would seem they are however there is no mention of how / where they got the sub or breathing gear from.
If anyone could shed some light on this that would be great. Cheers everyone.
-
All ports are open this is not a port issue.
-
Hello.
Please try to keep support for your product on our ticketing system or our forums so I can help you faster.
Can you give me your IP/port and I will ensure your server is setup and working for you myself.
-
We are finished integrating BEC and its ready for you all to install from the Mod Manager now!
[RELEASE] Custom GUI / Menu UPDATED for 1061
in A2: Epoch Mods
Posted
Here is the new keyboard.sqf to work this cool mod with Epoch 1.0.7 I just made it for our server :)
// (c) [email protected], licensed to DayZMod for the community
#include "\ca\editor\Data\Scripts\dikCodes.h"
local _dikCode = _this select 1;
local _shiftState = _this select 2;
local _ctrlState = _this select 3;
local _altState = _this select 4;
local _handled = false;
if (isNil "keyboard_keys") then {
local _cancelBuild = {
DZE_cancelBuilding = true;
call dayz_EjectPlayer;
_handled = false;
if (r_player_dead) then {_handled = true;}; // Disable ESC after death
};
local _dze_f = {
if (!_ctrlState && !_altState) then {DZE_F = true;};
};
local _dze_q = {
if (!_ctrlState && !_altState) then {DZE_Q = true;};
if (!_ctrlState && _altState) then {DZE_Q_alt = true;};
if (_ctrlState && !_altState) then {DZE_Q_ctrl = true;};
};
local _dze_z = {
if (!_ctrlState && !_altState) then {DZE_Z = true;};
if (!_ctrlState && _altState) then {DZE_Z_alt = true;};
if (_ctrlState && !_altState) then {DZE_Z_ctrl = true;};
};
local _autoRun = {
if (!dayz_autoRun) then {
dayz_autoRun = true;
dayz_autoRunThread = [] spawn {
local _weapon = currentWeapon player;
while {dayz_autoRun} do {
// SurfaceIsWater does not work for ponds
// Check weapon to detect Arma action (dayz action is handled in dz_fn_switchWeapon)
if (player != vehicle player || {r_fracture_legs || {surfaceIsWater getPosASL player} || {currentWeapon player != _weapon} || {(call fn_nearWaterHole) select 0}}) exitWith {
call dayz_autoRunOff;
};
player playAction "FastF";
uiSleep 0.5;
};
};
} else {
call dayz_autoRunOff;
};
_handled = true;
};
local _filterCheat = {
//Overriding default engine handling does not stop cheat input, need manual disableUserInput too
_handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
};
local _openGroups = {
if (dayz_requireRadio && {!("ItemRadio" in items player)}) then {
localize "STR_EPOCH_NEED_RADIO" call dayz_rollingMessages;
} else {
if (isNull findDisplay 80000) then {
if (!isNil "dayz_groupInit") then {[] spawn dayz_openGroupDialog;};
} else {
findDisplay 80000 closeDisplay 2;
};
};
_handled = true;
};
local _muteSound = {
call player_toggleSoundMute;
_handled = true;
};
local _statusUI = {
DZE_UI = DZE_UI + 1;
if (DZE_UI == 6) then {DZE_UI = 0; [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;};
if (DZE_UI == 1) then {[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;};
profileNamespace setVariable ["statusUI",DZE_UI];
saveProfileNamespace;
call ui_changeDisplay;
_handled = true;
};
local _rifle = {
2 call dz_fn_switchWeapon;
_handled = true;
};
local _pistol = {
3 call dz_fn_switchWeapon;
_handled = true;
};
local _melee = { // Also works for rifle on back if DZE_TwoPrimaries = 2;
4 call dz_fn_switchWeapon;
_handled = true;
};
local _surrender = {
call player_surrender;
_handled = true;
};
local _gear = {
if ((vehicle player != player) && {!_shiftState && !_ctrlState && !_altState && !dialog}) then {
createGearDialog [player, "RscDisplayGear"];
_handled = true;
} else {
if ((vehicle player == player) && {speed vehicle player > 0}) then {
//[objNull, player, rSwitchMove,""] call RE;
_handled = true;
};
};
};
local _forcesave = {
if (diag_tickTime - dayz_lastSave > 10) then {
call player_forceSave;
};
};
local _drop = {
local _doors = [];
if (r_drag_sqf) then {
_doors = nearestObjects [player, DayZ_DropDrageeObjects, 3]; //Prevent dropping dragged player through objects
if (count _doors > 0) then {_handled = true;};
force_dropBody = true;
} else {
_doors = nearestObjects [player, DZE_DoorsLocked, 3];
if (count _doors > 0 && {speed player > 0}) then {_handled = true;}; //Prevent sprint and prone through doors glitch
};
};
local _interrupt = {
r_interrupt = true;
if (DZE_Surrender) then {call dze_surrender_off};
if (dayz_autoRun) then {call dayz_autoRunOff;};
};
// TODO: left/right, when gear open: onKeyDown = "[_this,'onKeyDown',0,107,0,107] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
local _noise = {
//Overriding default engine handling does not stop combination binds, need manual disableUserInput too
_handled = [displayNull,_dikCode,_shiftState] call dze_filterCheats;
if (diag_ticktime - dayz_lastCheckBit > 10 && {!(_dikCode in channel_keys)}) then {
dayz_lastCheckBit = diag_ticktime;
[player,20,true,(getPosATL player)] call player_alertZombies;
};
};
local _journal = {
if (!dayz_isSwimming && !dialog) then {
[player,4,true,(getPosATL player)] call player_alertZombies;
createDialog 'horde_journal_front_cover';
};
_handled = true;
};
local _bunnyhop = {
r_interrupt = true;
if (animationState player in ["bunnyhopunarmed","bunnyhoprifle"]) then {
//Fixes invisible weapon switch glitch if double tapping vault with no weapon in hands
_handled = true;
};
if (player isKindOf "PZombie_VB") then {
_handled = true; // do not allow player zombies to vault or jump
} else {
local _nearbyObjects = nearestObjects [getPosATL player, dayz_disallowedVault, 8];
if (count _nearbyObjects > 0) then {
if (diag_tickTime - dayz_lastCheckBit > 4) then {
[objNull, player, rSwitchMove,"GetOver"] call RE;
player playActionNow "GetOver";
dayz_lastCheckBit = diag_tickTime;
} else {
_handled = true;
};
};
};
};
//ESLKESLK Menu
local _informenu = {if (isNull findDisplay 7777) then {
execVM "custom\menu\menu_init.sqf";
};
_handled = true;
};
local _block = {
_handled = true;
};
local _addArray = {
{
if (_x <= 999999) then {
keyboard_keys set [_x, _this select 1];
};
} forEach (_this select 0);
};
keyboard_keys = [];
channel_keys = [];
voice_keys = [];
{voice_keys = voice_keys + (actionKeys _x)} count voice_actions;
{channel_keys = channel_keys + (actionKeys _x)} count ["NextChannel","PrevChannel"];
keyboard_keys resize 256;
[[DIK_TAB], _informenu] call _addArray;
[[DIK_ESCAPE], _cancelBuild] call _addArray;
[[DIK_INSERT], {DZE_Q_alt = true;}] call _addArray;
[[DIK_A,DIK_D,DIK_LEFT,DIK_RIGHT], _interrupt] call _addArray;
[[DIK_F], _dze_f] call _addArray;
[[DIK_PRIOR], _dze_q] call _addArray;
[[DIK_NEXT], _dze_z] call _addArray;
[[DIK_Q], {DZE_4 = true;}] call _addArray;
[[DIK_E], {DZE_6 = true;}] call _addArray;
[[DIK_0], _autoRun] call _addArray;
[[DIK_NUMPADMINUS,DIK_LSHIFT], _filterCheat] call _addArray;
[[DIK_SPACE], {DZE_5 = true;}] call _addArray;
[actionKeys "User6", {DZE_F = true;}] call _addArray;
[actionKeys "User7", {DZE_Q_ctrl = true;}] call _addArray;
[actionKeys "User8", {DZE_Z_ctrl = true;}] call _addArray;
[actionKeys "User13", {DZE_Q_alt = true;}] call _addArray;
[actionKeys "User14", {DZE_Z_alt = true;}] call _addArray;
[actionKeys "User15", {DZE_Q = true;}] call _addArray;
[actionKeys "User16", {DZE_Z = true;}] call _addArray;
[actionKeys "User17", {DZE_4 = true;}] call _addArray;
[actionKeys "User18", {DZE_6 = true;}] call _addArray;
[actionKeys "User19", {DZE_5 = true;}] call _addArray;
[actionKeys "Surrender", _surrender] call _addArray;
[[DIK_1], _rifle] call _addArray;
[[DIK_2], _pistol] call _addArray;
[[DIK_3], _melee] call _addArray;
[actionKeys "Gear", _gear] call _addArray;
[actionKeys "Prone", _drop] call _addArray;
[actionKeys "Crouch", _drop] call _addArray;
[actionKeys "MoveLeft", _interrupt] call _addArray;
[actionKeys "MoveRight", _interrupt] call _addArray;
[actionKeys "MoveForward", _interrupt] call _addArray;
[actionKeys "MoveBack", _interrupt] call _addArray;
[actionKeys "TurnLeft", _interrupt] call _addArray;
[actionKeys "TurnRight", _interrupt] call _addArray;
[actionKeys "PushToTalk", _noise] call _addArray;
[actionKeys "PushToTalkAll", _noise] call _addArray;
[actionKeys "PushToTalkCommand", _noise] call _addArray;
[actionKeys "PushToTalkDirect", _noise] call _addArray;
[actionKeys "PushToTalkGroup", _noise] call _addArray;
[actionKeys "PushToTalkSide", _noise] call _addArray;
[actionKeys "PushToTalkVehicle", _noise] call _addArray;
[actionKeys "VoiceOverNet", _noise] call _addArray;
[actionKeys "NextChannel", _noise] call _addArray;
[actionKeys "PrevChannel", _noise] call _addArray;
[actionKeys "Chat", _noise] call _addArray;
[actionKeys "User20", _journal] call _addArray;
[actionKeys "Diary", _journal] call _addArray;
[actionKeys "NetworkStats", _journal] call _addArray;
[[DIK_F1], _muteSound] call _addArray;
[[DIK_F3], _statusUI] call _addArray;
[[DIK_F4], {if (diag_tickTime - dayz_lastSave > 10) then {call player_forceSave;};_handled = true;}] call _addArray;
//[[DIK_TAB,DIK_DELETE], _forcesave] call _addArray;
[actionKeys "LeanLeft", {DZE_4 = true; dayz_dodge = true;}] call _addArray;
[actionKeys "LeanRight", {DZE_6 = true; dayz_dodge = true;}] call _addArray;
[actionKeys "GetOver", _bunnyhop] call _addArray; // V
[actionKeys "ForceCommandingMode", {DZE_5 = true;_handled = true;}] call _addArray;
[[ DIK_F9,DIK_F10,DIK_F11,DIK_F12,
DIK_F8,DIK_F7,DIK_F6,DIK_F5,
DIK_F2,DIK_9,
DIK_8,DIK_7,DIK_6,DIK_5,DIK_4,DIK_BACK], _block] call _addArray;
if (dayz_groupSystem) then {
[[DIK_F5], _openGroups] call _addArray;
[[DIK_LWIN,DIK_RWIN], {dayz_groupNameTags = !dayz_groupNameTags;_handled = true;}] call _addArray;
[actionKeys "TacticalView", _block] call _addArray;
};
[actionKeys "DSInterface", _block] call _addArray;
[[DIK_P], {if (_shiftState) then {_handled = true;};}] call _addArray;
//diag_log "keyboard_keys reset";
};
if (r_player_unconsciousInputDisabled) exitWith {true};
local _code = keyboard_keys select _dikCode;
if (!isNil "_code") then {
call _code;
};
_handled