mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
player_build.sqf Enhancements and PV renames
This commit is contained in:
@@ -49,7 +49,7 @@ class EpochDeathBoardDialog
|
||||
y = 0.706267 * safezoneH + safezoneY;
|
||||
w = 0.0743671 * safezoneW;
|
||||
h = 0.0550044 * safezoneH;
|
||||
onButtonClick = "dayzPlayerDeathsResult = nil; ((ctrlParent (_this select 0)) closeDisplay 9000);";
|
||||
onButtonClick = "PVDZE_plr_DeathBResult = nil; ((ctrlParent (_this select 0)) closeDisplay 9000);";
|
||||
};
|
||||
class RscStructuredText_1100: RscStructuredText
|
||||
{
|
||||
|
||||
@@ -10,17 +10,17 @@ _activatingPlayer = _this select 1;
|
||||
_trader_id = (_this select 3) select 0;
|
||||
// _category = (_this select 3) select 1;
|
||||
|
||||
dayzTraderMenuResult = call compile format["tcacheBuy_%1;",_trader_id];
|
||||
PVDZE_plr_TradeMenuResult = call compile format["tcacheBuy_%1;",_trader_id];
|
||||
|
||||
if(isNil "dayzTraderMenuResult") then {
|
||||
if(isNil "PVDZE_plr_TradeMenuResult") then {
|
||||
//diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||
dayzTraderMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "dayzTraderMenu";
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
//["PVDZE_plr_TradeMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||
PVDZE_plr_TradeMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "PVDZE_plr_TradeMenu";
|
||||
waitUntil {!isNil "PVDZE_plr_TradeMenuResult"};
|
||||
};
|
||||
|
||||
//diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
//diag_log format["DEBUG Buy: %1", PVDZE_plr_TradeMenuResult];
|
||||
{
|
||||
_header = _x select 0; // "TRD"
|
||||
|
||||
@@ -109,14 +109,14 @@ if(isNil "dayzTraderMenuResult") then {
|
||||
//diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
} forEach PVDZE_plr_TradeMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
// Cache data in client side global variable
|
||||
call compile format["tcacheBuy_%1 = %2;",_tid,dayzTraderMenuResult];
|
||||
call compile format["tcacheBuy_%1 = %2;",_tid,PVDZE_plr_TradeMenuResult];
|
||||
|
||||
// Clear Data
|
||||
dayzTraderMenuResult = nil;
|
||||
PVDZE_plr_TradeMenuResult = nil;
|
||||
s_player_parts_crtl = 1;
|
||||
@@ -99,9 +99,9 @@ if(_IsNearVehicle >= 1) then {
|
||||
// calculate new fuel
|
||||
_newFuelSrc = (_newFuelSrc / _capacitySrc);
|
||||
if (_newFuelSrc > 0) then {
|
||||
dayzSetFuel = [_vehicleSrc,_newFuelSrc];
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
publicVariable "dayzSetFuel";
|
||||
PVDZE_veh_SFuel = [_vehicleSrc,_newFuelSrc];
|
||||
PVDZE_veh_SFuel spawn local_setFuel;
|
||||
publicVariable "PVDZE_veh_SFuel";
|
||||
} else {
|
||||
_isFillok = false;
|
||||
_abort = true;
|
||||
@@ -118,9 +118,9 @@ if(_IsNearVehicle >= 1) then {
|
||||
// calculate minimum needed fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
publicVariable "dayzSetFuel";
|
||||
PVDZE_veh_SFuel = [_vehicle,_newFuel];
|
||||
PVDZE_veh_SFuel spawn local_setFuel;
|
||||
publicVariable "PVDZE_veh_SFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private [];
|
||||
//["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure;
|
||||
dayzUpdateVehicle = [_this select 3,"all"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
//["PVDZE_veh_Update",[_this select 3,"all"]] call callRpcProcedure;
|
||||
PVDZE_veh_Update = [_this select 3,"all"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
@@ -73,9 +73,9 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
|
||||
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
|
||||
|
||||
dayzGutBody = [_item,_qty];
|
||||
dayzGutBody spawn local_gutObject;
|
||||
publicVariable "dayzGutBody";
|
||||
PVDZE_plr_GutBody = [_item,_qty];
|
||||
PVDZE_plr_GutBody spawn local_gutObject;
|
||||
publicVariable "PVDZE_plr_GutBody";
|
||||
|
||||
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
||||
cutText [_string, "PLAIN DOWN"];
|
||||
|
||||
@@ -69,9 +69,9 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||
|
||||
_qty = 1;
|
||||
|
||||
dayzGutBody = [_item,_qty];
|
||||
dayzGutBody spawn local_gutObjectZ;
|
||||
publicVariable "dayzGutBodyZ";
|
||||
PVDZE_plr_GutBody = [_item,_qty];
|
||||
PVDZE_plr_GutBody spawn local_gutObjectZ;
|
||||
publicVariable "PVDZE_plr_GutBodyZ";
|
||||
|
||||
// Reduce humanity for gutting zeds
|
||||
_humanity = player getVariable["humanity",0];
|
||||
|
||||
@@ -13,13 +13,13 @@ if (_removed == 1) then {
|
||||
|
||||
if((random 10) <= 7.5) then {
|
||||
|
||||
dayzLockVehicle = [_vehicle,false];
|
||||
PVDZE_veh_Lock = [_vehicle,false];
|
||||
if(player distance _vehicle < 10) then {
|
||||
|
||||
if (local _vehicle) then {
|
||||
dayzLockVehicle spawn local_lockUnlock
|
||||
PVDZE_veh_Lock spawn local_lockUnlock
|
||||
} else {
|
||||
publicVariable "dayzLockVehicle";
|
||||
publicVariable "PVDZE_veh_Lock";
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -5,18 +5,18 @@ _activatingPlayer = _this select 1;
|
||||
|
||||
//diag_log format["DEBUG DEATH OBJ: %1", _this select 0];
|
||||
|
||||
//["dayzPlayerDeaths",[_activatingPlayer]] call callRpcProcedure;
|
||||
dayzPlayerDeaths = [_activatingPlayer];
|
||||
publicVariableServer "dayzPlayerDeaths";
|
||||
//["PVDZE_plr_DeathB",[_activatingPlayer]] call callRpcProcedure;
|
||||
PVDZE_plr_DeathB = [_activatingPlayer];
|
||||
publicVariableServer "PVDZE_plr_DeathB";
|
||||
|
||||
waitUntil {!isNil "dayzPlayerDeathsResult"};
|
||||
waitUntil {!isNil "PVDZE_plr_DeathBResult"};
|
||||
|
||||
//diag_log format["DEBUG Death: %1", dayzPlayerDeathsResult];
|
||||
//diag_log format["DEBUG Death: %1", PVDZE_plr_DeathBResult];
|
||||
|
||||
if((count dayzPlayerDeathsResult) > 0) then {
|
||||
if((count PVDZE_plr_DeathBResult) > 0) then {
|
||||
// load death message board ui
|
||||
call EpochDeathBoardLoad;
|
||||
} else {
|
||||
cutText ["No recent Deaths.", "PLAIN DOWN"];
|
||||
dayzPlayerDeathsResult = nil;
|
||||
PVDZE_plr_DeathBResult = nil;
|
||||
};
|
||||
@@ -7,12 +7,12 @@ TradeInprogress = true;
|
||||
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
|
||||
dayzLockVehicle = [_vehicle,true];
|
||||
PVDZE_veh_Lock = [_vehicle,true];
|
||||
if(player distance _vehicle < 10) then {
|
||||
if (local _vehicle) then {
|
||||
dayzLockVehicle spawn local_lockUnlock
|
||||
PVDZE_veh_Lock spawn local_lockUnlock
|
||||
} else {
|
||||
publicVariable "dayzLockVehicle";
|
||||
publicVariable "PVDZE_veh_Lock";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -121,8 +121,6 @@ if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missi
|
||||
if (_hasrequireditem) then {
|
||||
|
||||
_location = [0,0,0];
|
||||
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
|
||||
// get inital players position
|
||||
@@ -142,25 +140,23 @@ if (_hasrequireditem) then {
|
||||
_position = getPosATL _object;
|
||||
|
||||
cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to build.", "PLAIN DOWN"];
|
||||
|
||||
_counter = time;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
_zheightchanged = false;
|
||||
_zheightdirection = "";
|
||||
_rotate = false;
|
||||
_tick = 1;
|
||||
|
||||
if (DZE_Q) then {
|
||||
DZE_Q = false;
|
||||
_zheightdirection = "up";
|
||||
_zheightchanged = true;
|
||||
_tick = 10;
|
||||
};
|
||||
if (DZE_Z) then {
|
||||
DZE_Z = false;
|
||||
_zheightdirection = "down";
|
||||
_zheightchanged = true;
|
||||
_tick = 10;
|
||||
};
|
||||
|
||||
|
||||
@@ -168,13 +164,11 @@ if (_hasrequireditem) then {
|
||||
DZE_Q_alt = false;
|
||||
_zheightdirection = "up_alt";
|
||||
_zheightchanged = true;
|
||||
_tick = 100;
|
||||
};
|
||||
if (DZE_Z_alt) then {
|
||||
DZE_Z_alt = false;
|
||||
_zheightdirection = "down_alt";
|
||||
_zheightchanged = true;
|
||||
_tick = 100;
|
||||
};
|
||||
|
||||
|
||||
@@ -211,28 +205,25 @@ if (_hasrequireditem) then {
|
||||
|
||||
_position = getPosATL _object;
|
||||
|
||||
// make z height stick to ticks
|
||||
// _ztick = (round((_position select 2)*100)/100);
|
||||
|
||||
if(_zheightdirection == "up") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)+0.1)];
|
||||
_position set [2,((_position select 2)+0.1)];
|
||||
};
|
||||
if(_zheightdirection == "down") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)-0.1)];
|
||||
_position set [2,((_position select 2)-0.1)];
|
||||
};
|
||||
|
||||
if(_zheightdirection == "up_alt") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)+1)];
|
||||
_position set [2,((_position select 2)+1)];
|
||||
};
|
||||
if(_zheightdirection == "down_alt") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)-1)];
|
||||
_position set [2,((_position select 2)-1)];
|
||||
};
|
||||
|
||||
if(_zheightdirection == "up_ctrl") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)+0.01)];
|
||||
_position set [2,((_position select 2)+0.01)];
|
||||
};
|
||||
if(_zheightdirection == "down_ctrl") then {
|
||||
_position = [(_position select 0),(_position select 1), ((_position select 2)-0.01)];
|
||||
_position set [2,((_position select 2)-0.01)];
|
||||
};
|
||||
|
||||
_object setDir (getDir _object);
|
||||
@@ -244,8 +235,6 @@ if (_hasrequireditem) then {
|
||||
_object attachTo [player];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
sleep 1;
|
||||
|
||||
@@ -268,7 +257,7 @@ if (_hasrequireditem) then {
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
if(_counter >= 500) exitWith {
|
||||
if((time-_counter) >= 60) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Ran out of time to find position.";
|
||||
@@ -276,9 +265,7 @@ if (_hasrequireditem) then {
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
cutText [format["%1",(500-_counter)], "PLAIN DOWN"];
|
||||
|
||||
_counter = _counter + _tick;
|
||||
cutText [format["%1",(time-_counter)], "PLAIN DOWN"];
|
||||
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {
|
||||
_isOk = false;
|
||||
@@ -295,8 +282,6 @@ if (_hasrequireditem) then {
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
// No building on roads
|
||||
@@ -441,8 +426,8 @@ if (_hasrequireditem) then {
|
||||
_tmpbuilt setVariable ["CharacterID",_combination,true];
|
||||
|
||||
|
||||
dayzPublishObj = [_combination,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "PVDZE_obj_Publish";
|
||||
|
||||
cutText [format["You have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5];
|
||||
|
||||
@@ -454,8 +439,8 @@ if (_hasrequireditem) then {
|
||||
if(_tmpbuilt isKindOf "Land_Fire") then {
|
||||
_tmpbuilt spawn player_fireMonitor;
|
||||
} else {
|
||||
dayzPublishObj = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "PVDZE_obj_Publish";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ if ((count _upgrade) > 0) then {
|
||||
|
||||
cutText [format["You have downgraded %1.",_text], "PLAIN DOWN", 5];
|
||||
|
||||
dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "dayzSwapObj";
|
||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Swap";
|
||||
|
||||
player reveal _object;
|
||||
|
||||
|
||||
@@ -98,8 +98,8 @@ if (_proceed) then {
|
||||
// Set location
|
||||
_object setPosATL _location;
|
||||
|
||||
dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "dayzSwapObj";
|
||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Swap";
|
||||
|
||||
cutText [format["You have repaired %1.",_text], "PLAIN DOWN", 5];
|
||||
|
||||
|
||||
@@ -73,9 +73,9 @@ player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
|
||||
player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
|
||||
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||
dayzPlayerSave = [player,[],true,true];
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
//["PVDZE_plr_Save",[player,[],true]] call callRpcProcedure;
|
||||
PVDZE_plr_Save = [player,[],true,true];
|
||||
publicVariableServer "PVDZE_plr_Save";
|
||||
|
||||
dayz_lastMeal = time;
|
||||
dayz_hunger = 0;
|
||||
|
||||
@@ -162,8 +162,8 @@ if ((count _upgrade) > 0) then {
|
||||
cutText [format["You have upgraded %1.",_text], "PLAIN DOWN", 5];
|
||||
};
|
||||
|
||||
dayzSwapObj = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "dayzSwapObj";
|
||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Swap";
|
||||
|
||||
player reveal _object;
|
||||
|
||||
|
||||
@@ -63,9 +63,9 @@ if(!(alive _item)) then {
|
||||
dayz_lastMeal = time;
|
||||
dayz_hunger = 0;
|
||||
|
||||
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||
dayzPlayerSave = [player,[],true,false];
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
//["PVDZE_plr_Save",[player,[],true]] call callRpcProcedure;
|
||||
PVDZE_plr_Save = [player,[],true,false];
|
||||
publicVariableServer "PVDZE_plr_Save";
|
||||
|
||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||
|
||||
|
||||
@@ -105,9 +105,9 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"];
|
||||
|
||||
if(([player,_canName] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
publicVariable "dayzSetFuel";
|
||||
PVDZE_veh_SFuel = [_vehicle,_newFuel];
|
||||
PVDZE_veh_SFuel spawn local_setFuel;
|
||||
publicVariable "PVDZE_veh_SFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
@@ -154,8 +154,8 @@ if (_proceed) then {
|
||||
deleteVehicle _obj;
|
||||
|
||||
if(!_isWreck) then {
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
PVDZE_obj_Delete = [_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
};
|
||||
|
||||
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"];
|
||||
|
||||
@@ -70,10 +70,10 @@ if (_section and _hasToolbox) then {
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||
|
||||
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||
dayzSetFix = [_vehicle,_selection,0];
|
||||
publicVariable "dayzSetFix";
|
||||
PVDZE_veh_SFix = [_vehicle,_selection,0];
|
||||
publicVariable "PVDZE_veh_SFix";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFix call object_setFixServer;
|
||||
PVDZE_veh_SFix call object_setFixServer;
|
||||
};
|
||||
|
||||
_vehicle setvelocity [0,0,1];
|
||||
@@ -114,11 +114,11 @@ _allFixed = true;
|
||||
//update if repaired
|
||||
if (_allFixed) then {
|
||||
_vehicle setDamage 0;
|
||||
//["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
|
||||
dayzSetFix = [_vehicle,_selection,0];
|
||||
publicVariable "dayzSetFix";
|
||||
//["PVDZE_veh_Update",[_vehicle,"repair"]] call callRpcProcedure;
|
||||
PVDZE_veh_SFix = [_vehicle,_selection,0];
|
||||
publicVariable "PVDZE_veh_SFix";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFix call object_setFixServer;
|
||||
PVDZE_veh_SFix call object_setFixServer;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -77,12 +77,12 @@ if (_hasToolbox) then {
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||
|
||||
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||
//["dayzSetFix",[_vehicle,_selection,1],_vehicle] call broadcastRpcCallIfLocal;
|
||||
//["PVDZE_veh_SFix",[_vehicle,_selection,1],_vehicle] call broadcastRpcCallIfLocal;
|
||||
|
||||
dayzSetFix = [_vehicle,_selection,1];
|
||||
publicVariable "dayzSetFix";
|
||||
PVDZE_veh_SFix = [_vehicle,_selection,1];
|
||||
publicVariable "PVDZE_veh_SFix";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFix call object_setFixServer;
|
||||
PVDZE_veh_SFix call object_setFixServer;
|
||||
};
|
||||
|
||||
_vehicle setvelocity [0,0,1];
|
||||
|
||||
@@ -11,17 +11,17 @@ _activatingPlayer = _this select 1;
|
||||
_trader_id = (_this select 3) select 0;
|
||||
//_category = (_this select 3) select 1;
|
||||
|
||||
dayzTraderMenuResult = call compile format["tcacheSell_%1;",_trader_id];
|
||||
PVDZE_plr_TradeMenuResult = call compile format["tcacheSell_%1;",_trader_id];
|
||||
|
||||
if(isNil "dayzTraderMenuResult") then {
|
||||
if(isNil "PVDZE_plr_TradeMenuResult") then {
|
||||
//diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||
dayzTraderMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "dayzTraderMenu";
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
//["PVDZE_plr_TradeMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||
PVDZE_plr_TradeMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "PVDZE_plr_TradeMenu";
|
||||
waitUntil {!isNil "PVDZE_plr_TradeMenuResult"};
|
||||
};
|
||||
|
||||
//diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
//diag_log format["DEBUG Buy: %1", PVDZE_plr_TradeMenuResult];
|
||||
{
|
||||
_header = _x select 0; // "TRD"
|
||||
|
||||
@@ -132,17 +132,17 @@ if(isNil "dayzTraderMenuResult") then {
|
||||
// diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
} forEach PVDZE_plr_TradeMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 0, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
// Cache data in client side global variable
|
||||
call compile format["tcacheSell_%1 = %2;",_tid,dayzTraderMenuResult];
|
||||
call compile format["tcacheSell_%1 = %2;",_tid,PVDZE_plr_TradeMenuResult];
|
||||
|
||||
|
||||
// Clear Data
|
||||
dayzTraderMenuResult = nil;
|
||||
PVDZE_plr_TradeMenuResult = nil;
|
||||
|
||||
|
||||
s_player_parts_crtl = 1;
|
||||
|
||||
@@ -111,11 +111,11 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
|
||||
if(([player,_canNameEmpty] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
PVDZE_veh_SFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
PVDZE_veh_SFuel spawn local_setFuel;
|
||||
};
|
||||
publicVariable "dayzSetFuel";
|
||||
publicVariable "PVDZE_veh_SFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
@@ -59,9 +59,9 @@ if (!_isOk) then {
|
||||
|
||||
_object setVariable ["CharacterID",dayz_characterID,true];
|
||||
|
||||
//["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
//["PVDZE_obj_Publish",[dayz_characterID,_tent,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
publicVariableServer "PVDZE_obj_Publish";
|
||||
|
||||
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
||||
} else {
|
||||
|
||||
@@ -81,11 +81,11 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "dayzTradeObject";
|
||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "PVDZE_obj_Trade";
|
||||
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
@@ -127,9 +127,9 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
|
||||
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
|
||||
publicVariableServer "dayzPublishVeh2";
|
||||
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
@@ -154,9 +154,9 @@ if (_qty >= _qty_in) then {
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
//["PVDZE_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
PVDZE_obj_Delete = [_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
|
||||
@@ -80,11 +80,11 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "dayzTradeObject";
|
||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "PVDZE_obj_Trade";
|
||||
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
@@ -126,9 +126,9 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
|
||||
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
|
||||
publicVariableServer "dayzPublishVeh2";
|
||||
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
@@ -180,9 +180,9 @@ if (_qty >= _qty_in) then {
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
//["PVDZE_obj_Delete",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
PVDZE_obj_Delete = [_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
|
||||
@@ -83,11 +83,11 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "dayzTradeObject";
|
||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "PVDZE_obj_Trade";
|
||||
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||
//diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade];
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ for "_x" from 1 to _total_trades do {
|
||||
if (_removed == _qty_in) then {
|
||||
|
||||
// Continue with trade.
|
||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "dayzTradeObject";
|
||||
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "PVDZE_obj_Trade";
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ if (_qty >= _qty_in) then {
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "dayzTradeObject";
|
||||
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos];
|
||||
publicVariableServer "PVDZE_obj_Trade";
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ TradeInprogress = true;
|
||||
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
|
||||
dayzLockVehicle = [_vehicle,false];
|
||||
PVDZE_veh_Lock = [_vehicle,false];
|
||||
if(player distance _vehicle < 10) then {
|
||||
if (local _vehicle) then {
|
||||
dayzLockVehicle spawn local_lockUnlock
|
||||
PVDZE_veh_Lock spawn local_lockUnlock
|
||||
} else {
|
||||
publicVariable "dayzLockVehicle";
|
||||
publicVariable "PVDZE_veh_Lock";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -159,9 +159,9 @@ if(!_cancel) then {
|
||||
_tent setVariable ["CharacterID",_combination,true];
|
||||
_tent setVariable ["OEMPos",_location,true];
|
||||
|
||||
//["dayzPublishObj",[_combination,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
|
||||
dayzPublishObj = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
//["PVDZE_obj_Publish",[_combination,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
|
||||
PVDZE_obj_Publish = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];
|
||||
publicVariableServer "PVDZE_obj_Publish";
|
||||
|
||||
cutText [format["You have setup your Safe. Combination is %1",_combination], "PLAIN DOWN", 5];
|
||||
};
|
||||
|
||||
@@ -32,9 +32,9 @@ _unitIsPlayer = _unit == player;
|
||||
if (_isPlayer) then {
|
||||
if (_damage > 0.1) then {
|
||||
dayz_canDisconnect = false;
|
||||
//["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
|
||||
dayzDiscoAdd = getPlayerUID player;
|
||||
publicVariableServer "dayzDiscoAdd";
|
||||
//["PVDZE_plr_DiscAdd",getPlayerUID player] call callRpcProcedure;
|
||||
PVDZE_plr_DiscAdd = getPlayerUID player;
|
||||
publicVariableServer "PVDZE_plr_DiscAdd";
|
||||
|
||||
dayz_damageCounter = time;
|
||||
|
||||
@@ -59,9 +59,9 @@ if (_unitIsPlayer) then {
|
||||
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
|
||||
//Process Morality Hit
|
||||
_humanityHit = -(_myKills * _damage);
|
||||
//["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
|
||||
dayzHumanity = [_source,_humanityHit,30];
|
||||
publicVariable "dayzHumanity";
|
||||
//["PVDZE_plr_HumanityChange",[_source,_humanityHit,30]] call broadcastRpcCallAll;
|
||||
PVDZE_plr_HumanityChange = [_source,_humanityHit,30];
|
||||
publicVariable "PVDZE_plr_HumanityChange";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -16,10 +16,10 @@ if (local _animalbody) then {
|
||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||
sleep 5;
|
||||
};
|
||||
//["dayzHideBody",_body] call broadcastRpcCallAll;
|
||||
dayzHideBody = _body;
|
||||
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
|
||||
PVDZE_plr_HideBody = _body;
|
||||
hideBody _body; // local player
|
||||
publicVariable "dayzHideBody"; // remote player
|
||||
publicVariable "PVDZE_plr_HideBody"; // remote player
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
true;
|
||||
|
||||
@@ -12,10 +12,10 @@ if (local _zombiebody) then {
|
||||
while {(count magazines _body >0) and (time - _timer < 300) } do {
|
||||
sleep 5;
|
||||
};
|
||||
//["dayzHideBody",_body] call broadcastRpcCallAll;
|
||||
dayzHideBody = _body;
|
||||
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
|
||||
PVDZE_plr_HideBody = _body;
|
||||
hideBody _body; // local player
|
||||
publicVariable "dayzHideBody"; // remote player
|
||||
publicVariable "PVDZE_plr_HideBody"; // remote player
|
||||
sleep 5;
|
||||
deleteVehicle _body;
|
||||
true;
|
||||
|
||||
@@ -12,15 +12,15 @@ if (_selection != "" and local _unit) then {
|
||||
if (isServer) then {
|
||||
[_unit,"repair"] call server_updateObject
|
||||
} else {
|
||||
dayzUpdateVehicle = [_unit,"repair"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
PVDZE_veh_Update = [_unit,"repair"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
};
|
||||
} else {
|
||||
if (isServer) then {
|
||||
[_unit,"damage"] call server_updateObject
|
||||
} else {
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
PVDZE_veh_Update = [_unit,"damage"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -12,9 +12,9 @@ if ((_selection != "") and local _unit) then {
|
||||
_unit setVariable [_strH,_total,true];
|
||||
|
||||
if (_damage >= 1) then {
|
||||
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
//["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
|
||||
PVDZE_veh_Update = [_unit,"damage"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
@@ -13,9 +13,9 @@ if (r_player_infected) then {
|
||||
};
|
||||
|
||||
//Send Death Notice
|
||||
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
|
||||
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
|
||||
publicVariableServer "dayzDeath";
|
||||
//["PVDZE_plr_Died",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
|
||||
PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
|
||||
publicVariableServer "PVDZE_plr_Died";
|
||||
|
||||
_id = [player,20,true,getPosATL player] spawn player_alertZombies;
|
||||
|
||||
@@ -65,9 +65,9 @@ if (count _array > 0) then {
|
||||
_wait = 0;
|
||||
};
|
||||
if (!_canHitFree) then {
|
||||
//["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
|
||||
dayzHumanity = [_source,_humanity,_wait];
|
||||
publicVariable "dayzHumanity";
|
||||
//["PVDZE_plr_HumanityChange",[_source,_humanity,_wait]] call broadcastRpcCallAll;
|
||||
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
|
||||
publicVariable "PVDZE_plr_HumanityChange";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ if (!(isNull _backpack) and local _backpack) then {
|
||||
_magazinescnt = count (_magazines select 0);
|
||||
if((_magazinescnt > 0) or (_weaponscnt > 0)) then {
|
||||
// hide backpack from everyone else
|
||||
dayzHideObject = _backpack;
|
||||
publicVariable "dayzHideObject";
|
||||
PVDZE_obj_Hide = _backpack;
|
||||
publicVariable "PVDZE_obj_Hide";
|
||||
};
|
||||
};
|
||||
@@ -53,15 +53,15 @@ if (_ammo isKindOf "SmokeShell") then {
|
||||
//hint str(_ammo);
|
||||
_projectile = nearestObject [_unit, "RoadFlare"];
|
||||
_id = [_projectile,0] spawn object_roadFlare;
|
||||
dayzRoadFlare = [_projectile,0];
|
||||
publicVariable "dayzRoadFlare";
|
||||
PVDZE_obj_RoadFlare = [_projectile,0];
|
||||
publicVariable "PVDZE_obj_RoadFlare";
|
||||
_id = _this spawn player_throwObject;
|
||||
};
|
||||
if (_ammo isKindOf "ChemLight") then {
|
||||
_projectile = nearestObject [_unit, "ChemLight"];
|
||||
_id = [_projectile,1] spawn object_roadFlare;
|
||||
dayzRoadFlare = [_projectile,1];
|
||||
publicVariable "dayzRoadFlare";
|
||||
PVDZE_obj_RoadFlare = [_projectile,1];
|
||||
publicVariable "PVDZE_obj_RoadFlare";
|
||||
_id = _this spawn player_throwObject;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, dayz_updateObjects, 10];
|
||||
{
|
||||
//["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
|
||||
dayzUpdateVehicle = [_x,"gear"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
//["PVDZE_veh_Update",[_x,"gear"]] call callRpcProcedure;
|
||||
PVDZE_veh_Update = [_x,"gear"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
|
||||
} foreach _objects;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ player setVariable["friendlies",_friendlies,true];
|
||||
player setVariable["tagList",_tagList,true];
|
||||
|
||||
//code for this on the server is missing
|
||||
//["dayzPlayerMorph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
|
||||
//["PVDZE_plr_Morph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
|
||||
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ sleep 3;
|
||||
if(!isNull _obj) then {
|
||||
|
||||
// force vault save just before locking
|
||||
dayzUpdateVehicle = [_obj,"gear"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
PVDZE_veh_Update = [_obj,"gear"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
|
||||
//place tent (local)
|
||||
_holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"];
|
||||
|
||||
@@ -57,10 +57,10 @@ if(!isNull _obj and alive _obj) then {
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
deleteVehicle _obj;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
PVDZE_obj_Delete = [_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call server_deleteObj;
|
||||
PVDZE_obj_Delete call server_deleteObj;
|
||||
};
|
||||
|
||||
//Add weapons
|
||||
|
||||
@@ -60,8 +60,8 @@ if(!isNull _obj and alive _obj) then {
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
// Remove from database
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
PVDZE_obj_Delete = [_objectID,_objectUID];
|
||||
publicVariableServer "PVDZE_obj_Delete";
|
||||
|
||||
// Set down vault "take" item
|
||||
_bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"];
|
||||
|
||||
@@ -64,7 +64,7 @@ if (_vehicle != player) then {
|
||||
|
||||
//diag_log ("Hitpoints " +str(_wound) +str(_total));
|
||||
|
||||
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||
//["PVDZE_plr_HitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||
if (_dam >= 1) then {
|
||||
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
|
||||
_cnt = count (DAYZ_woundHit select 1);
|
||||
@@ -80,8 +80,8 @@ if (_vehicle != player) then {
|
||||
_damage = 0.1 + random (1.2);
|
||||
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
||||
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
||||
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "dayzHit";
|
||||
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "PVDZE_plr_Hit";
|
||||
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
||||
};
|
||||
};
|
||||
@@ -116,8 +116,8 @@ if (_vehicle != player) then {
|
||||
|
||||
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
||||
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
||||
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "dayzHit";
|
||||
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "PVDZE_plr_Hit";
|
||||
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
||||
} else {
|
||||
//diag_log ("NO LOS: Player Hit on " + str(_unit) + " for " + str(_vehicle));
|
||||
@@ -127,8 +127,8 @@ if (_vehicle != player) then {
|
||||
_damage = 0.1 + random (1.2);
|
||||
diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
|
||||
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
|
||||
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "dayzHit";
|
||||
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
|
||||
//publicVariable "PVDZE_plr_Hit";
|
||||
[_unit,"hit",2,false] call dayz_zombieSpeak;
|
||||
};
|
||||
*/
|
||||
|
||||
@@ -23,12 +23,12 @@ if (_dam < 1 ) then {
|
||||
_unit setVariable [_strH,_total,true];
|
||||
if ( !_needUpdate ) then {
|
||||
_unit setVariable ["needUpdate",true,true];
|
||||
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||
//["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
|
||||
if (isServer) then {
|
||||
[_unit, "damage"] call server_updateObject;
|
||||
} else {
|
||||
dayzUpdateVehicle = [_unit,"damage"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
PVDZE_veh_Update = [_unit,"damage"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,12 +9,12 @@ _hitPoints = _unit call vehicle_getHitpoints;
|
||||
_unit setVariable [_selection, 1, true];
|
||||
} forEach _hitPoints;
|
||||
|
||||
//["dayzUpdateVehicle",[_unit, "damage"]] call callRpcProcedure;
|
||||
//["PVDZE_veh_Update",[_unit, "damage"]] call callRpcProcedure;
|
||||
if (isServer) then {
|
||||
[_unit, "killed"] call server_updateObject;
|
||||
} else {
|
||||
dayzUpdateVehicle = [_unit, "killed"];
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
PVDZE_veh_Update = [_unit, "killed"];
|
||||
publicVariableServer "PVDZE_veh_Update";
|
||||
};
|
||||
|
||||
_unit removeAllEventHandlers "HandleDamage";
|
||||
|
||||
@@ -31,8 +31,8 @@ if (_doLoiter) then {
|
||||
};
|
||||
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
|
||||
_agent = createAgent [_type, _position, [], _radius, _method];
|
||||
dayzSpawnZed = [_agent];
|
||||
publicVariableServer "dayzSpawnZed";
|
||||
PVDZE_zed_Spawn = [_agent];
|
||||
publicVariableServer "PVDZE_zed_Spawn";
|
||||
|
||||
if (_doLoiter) then {
|
||||
_agent setDir round(random 180);
|
||||
|
||||
@@ -498,12 +498,12 @@ if (!isDedicated) then {
|
||||
|
||||
lbAdd [TraderDialogItemList, "Loading items..."];
|
||||
|
||||
dayzTraderMenuResult = call compile format["tcacheBuy_%1;",_trader_id];
|
||||
PVDZE_plr_TradeMenuResult = call compile format["tcacheBuy_%1;",_trader_id];
|
||||
|
||||
if(isNil "dayzTraderMenuResult") then {
|
||||
dayzTraderMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "dayzTraderMenu";
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
if(isNil "PVDZE_plr_TradeMenuResult") then {
|
||||
PVDZE_plr_TradeMenu = [_activatingPlayer,_trader_id];
|
||||
publicVariableServer "PVDZE_plr_TradeMenu";
|
||||
waitUntil {!isNil "PVDZE_plr_TradeMenuResult"};
|
||||
};
|
||||
|
||||
lbClear TraderDialogItemList;
|
||||
@@ -618,7 +618,7 @@ if (!isDedicated) then {
|
||||
_header,
|
||||
_File
|
||||
]];
|
||||
} forEach dayzTraderMenuResult;
|
||||
} forEach PVDZE_plr_TradeMenuResult;
|
||||
TraderItemList = _item_list;
|
||||
};
|
||||
|
||||
@@ -673,7 +673,7 @@ if (!isDedicated) then {
|
||||
|
||||
EpochDeathBoardLoad = {
|
||||
createdialog "EpochDeathBoardDialog";
|
||||
/*dayzPlayerDeathsResult = [
|
||||
/*PVDZE_plr_DeathBResult = [
|
||||
["maca134","Bob","AK_107_Kobra",100,[8,30]],
|
||||
["Fred","Jonny","FN_FAL",42,[8,32]],
|
||||
["maca134","Bob","M9SD",100,[5,30]],
|
||||
@@ -681,7 +681,7 @@ if (!isDedicated) then {
|
||||
];*/
|
||||
{
|
||||
lbAdd [EpochDeathBoardDialogList, (_x select 0)];
|
||||
} forEach dayzPlayerDeathsResult;
|
||||
} forEach PVDZE_plr_DeathBResult;
|
||||
};
|
||||
|
||||
|
||||
@@ -701,7 +701,7 @@ if (!isDedicated) then {
|
||||
_i = _this select 0;
|
||||
if (_i < 0) exitWith {};
|
||||
_output = _this select 1;
|
||||
_record = dayzPlayerDeathsResult select _i;
|
||||
_record = PVDZE_plr_DeathBResult select _i;
|
||||
_record_stxt = call compile format["epoch_death_board_record_%1;",_i];
|
||||
if(isNil "_record_stxt") then {
|
||||
_record_stxt = format["<t size='1.6' align='left'>%1</t><br /><br />", (_record select 0)];
|
||||
|
||||
@@ -9,65 +9,61 @@
|
||||
"usecTransfuse" addPublicVariableEventHandler {(_this select 1) call player_medTransfuse};
|
||||
"usecMorphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
|
||||
"usecPainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller};
|
||||
"dayzHit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler};
|
||||
"dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
|
||||
"dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
|
||||
"dayzHideObject" addPublicVariableEventHandler {hideObject (_this select 1)};
|
||||
"dayzLockVehicle" addPublicVariableEventHandler {(_this select 1) spawn local_lockUnlock};
|
||||
"dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
|
||||
"dayzGutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ};
|
||||
"dayzDelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal};
|
||||
"dayzVehicleInit" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
|
||||
"dayzHumanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
|
||||
"dayz_serverObjectMonitor" addPublicVariableEventHandler {dayz_serverObjectMonitor = dayz_safety};
|
||||
"PVDZE_plr_Hit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler};
|
||||
"PVDZE_plr_HitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
|
||||
"usecBreakLegs" addPublicVariableEventHandler {(_this select 1) call player_breaklegs};
|
||||
"dayzSetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel};
|
||||
"dayzSetFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
|
||||
|
||||
//Both
|
||||
"PVDZE_veh_SFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel};
|
||||
"PVDZE_veh_SFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
|
||||
"PVDZE_plr_HideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
|
||||
"PVDZE_obj_Hide" addPublicVariableEventHandler {hideObject (_this select 1)};
|
||||
"PVDZE_veh_Lock" addPublicVariableEventHandler {(_this select 1) spawn local_lockUnlock};
|
||||
"PVDZE_plr_GutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
|
||||
"PVDZE_plr_GutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ};
|
||||
"PVDZE_plr_DelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal};
|
||||
"PVDZE_veh_Init" addPublicVariableEventHandler {(_this select 1) call fnc_veh_ResetEH};
|
||||
"PVDZE_plr_HumanityChange" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
|
||||
"PVDZE_serverObjectMonitor" addPublicVariableEventHandler {PVDZE_serverObjectMonitor = dayz_safety};
|
||||
|
||||
//Server only
|
||||
if (isServer) then {
|
||||
"dayzDeath" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
|
||||
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
|
||||
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
||||
"dayzPlayerSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
|
||||
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
||||
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
|
||||
"dayzLogin" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
|
||||
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
||||
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
|
||||
"dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
|
||||
"dayzLoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
|
||||
"dayzCharSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync};
|
||||
"PVDZE_plr_Died" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
|
||||
"PVDZE_plr_DiscAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
|
||||
"PVDZE_plr_DiscRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
||||
"PVDZE_plr_Save" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
|
||||
"PVDZE_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
||||
"PVDZE_veh_Update" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
|
||||
"PVDZE_plr_Login" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
|
||||
"PVDZE_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
||||
"PVDZE_plr_Morph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
|
||||
"PVDZE_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
|
||||
//Checking
|
||||
|
||||
"dayzDeleteObj" addPublicVariableEventHandler {(_this select 1) spawn server_deleteObj};
|
||||
"PVDZE_obj_Delete" addPublicVariableEventHandler {(_this select 1) spawn server_deleteObj};
|
||||
|
||||
// upgrade and maintain
|
||||
"dayzSwapObj" addPublicVariableEventHandler {(_this select 1) spawn server_swapObject};
|
||||
|
||||
// "atp" addPublicVariableEventHandler { _array = _this select 1; diag_log format["TELEPORT REVERT: %1 (%2) from %3 to %4 now at %5", _array select 0, _array select 1, _array select 2, _array select 3, _array select 4];};
|
||||
"PVDZE_obj_Swap" addPublicVariableEventHandler {(_this select 1) spawn server_swapObject};
|
||||
|
||||
// disable zombies server side
|
||||
"dayzSpawnZed" addPublicVariableEventHandler {(_this select 1) spawn server_handleZedSpawn};
|
||||
"PVDZE_zed_Spawn" addPublicVariableEventHandler {(_this select 1) spawn server_handleZedSpawn};
|
||||
|
||||
// Dayz epoch custom
|
||||
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh};
|
||||
"dayzPublishVeh2" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh2};
|
||||
"dayzTradeObject" addPublicVariableEventHandler {(_this select 1) spawn server_tradeObj};
|
||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
|
||||
"dayzPlayerDeaths" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
|
||||
"PVDZE_veh_Publish" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh};
|
||||
"PVDZE_veh_Publish2" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh2};
|
||||
"PVDZE_obj_Trade" addPublicVariableEventHandler {(_this select 1) spawn server_tradeObj};
|
||||
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
|
||||
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
|
||||
};
|
||||
|
||||
//Client only
|
||||
if (!isDedicated) then {
|
||||
"dayzSetDate" addPublicVariableEventHandler {setDate (_this select 1)};
|
||||
//"dayzFlies" addPublicVariableEventHandler {(_this select 1) call spawn_flies};
|
||||
"dayzRoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
|
||||
"PVDZE_plr_SetDate" addPublicVariableEventHandler {setDate (_this select 1)};
|
||||
"PVDZE_obj_RoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
|
||||
"PVDZE_plr_Morph2" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
|
||||
"PVDZE_plr_Morph" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
|
||||
"PVDZE_obj_Fire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
|
||||
|
||||
"norrnRaDrag" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
|
||||
"norrnRnoAnim" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
|
||||
"changeCharacter" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
|
||||
"dayzSwitch" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
|
||||
"dayzFire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
|
||||
};
|
||||
@@ -177,7 +177,7 @@ SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the c
|
||||
//Server Variables
|
||||
allowConnection = false;
|
||||
isSinglePlayer = false;
|
||||
dayz_serverObjectMonitor = [];
|
||||
PVDZE_serverObjectMonitor = [];
|
||||
PlayerDeaths = [];
|
||||
|
||||
//Streaming Variables (player only)
|
||||
@@ -375,16 +375,16 @@ dayz_zombieTargetList = [
|
||||
["Air",500],
|
||||
["LandVehicle",200]
|
||||
];
|
||||
dayzHit = [];
|
||||
dayzPublishObj = []; //used for eventhandler to spawn a mirror of players tent
|
||||
dayzHideBody = objNull;
|
||||
PVDZE_plr_Hit = [];
|
||||
PVDZE_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent
|
||||
PVDZE_plr_HideBody = objNull;
|
||||
dayz_selectedVault = objNull;
|
||||
dayz_selectedDoor = objNull;
|
||||
|
||||
dayzPublishVeh = []; // for vehicle traders
|
||||
dayzTradeObject = []; // For all traders increment qty
|
||||
dayzTraderMenu = []; // For all traders
|
||||
dayzPlayerDeaths = [];
|
||||
PVDZE_veh_Publish = []; // for vehicle traders
|
||||
PVDZE_obj_Trade = []; // For all traders increment qty
|
||||
PVDZE_plr_TradeMenu = []; // For all traders
|
||||
PVDZE_plr_DeathB = [];
|
||||
|
||||
//DayZ settings
|
||||
dayz_dawn = 6;
|
||||
|
||||
@@ -43,7 +43,7 @@ if (_finished) then {
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||
dayz_sourceBleeding = objNull;
|
||||
} else {
|
||||
//dayzHumanity = [player,20];
|
||||
//PVDZE_plr_HumanityChange = [player,20];
|
||||
[player,20] call player_humanityChange;
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ if (_finished) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
||||
} else {
|
||||
//dayzHumanity = [player,50];
|
||||
//PVDZE_plr_HumanityChange = [player,50];
|
||||
[player,50] call player_humanityChange;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if(_num_removed == 1) then {
|
||||
//Self Healing
|
||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
||||
} else {
|
||||
//dayzHumanity = [player,20];
|
||||
//PVDZE_plr_HumanityChange = [player,20];
|
||||
[player,20] call player_humanityChange;
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ if (_finished) then {
|
||||
usecTransfuse = [_unit,player];
|
||||
publicVariable "usecTransfuse";
|
||||
|
||||
//dayzHumanity = [player,100];
|
||||
//PVDZE_plr_HumanityChange = [player,100];
|
||||
[player,100] call player_humanityChange;
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -337,11 +337,11 @@ class FSM
|
||||
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
|
||||
" " \n
|
||||
" dayz_Magazines = _magazineArray;" \n
|
||||
" dayzPlayerSave = [player,dayz_Magazines,false,true];" \n
|
||||
" publicVariableServer ""dayzPlayerSave"";" \n
|
||||
" PVDZE_plr_Save = [player,dayz_Magazines,false,true];" \n
|
||||
" publicVariableServer ""PVDZE_plr_Save"";" \n
|
||||
" " \n
|
||||
" if (isServer) then {" \n
|
||||
" dayzPlayerSave call server_playerSync;" \n
|
||||
" PVDZE_plr_Save call server_playerSync;" \n
|
||||
" };" \n
|
||||
" " \n
|
||||
" dayz_lastSave = diag_tickTime;" \n
|
||||
@@ -481,11 +481,11 @@ class FSM
|
||||
"" \n
|
||||
"_msg = [];" \n
|
||||
"" \n
|
||||
"dayzLogin = [_playerUID,player];" \n
|
||||
"publicVariableServer ""dayzLogin"";" \n
|
||||
"PVDZE_plr_Login = [_playerUID,player];" \n
|
||||
"publicVariableServer ""PVDZE_plr_Login"";" \n
|
||||
"" \n
|
||||
"if (isServer) then {" \n
|
||||
" dayzLogin call server_playerLogin;" \n
|
||||
" PVDZE_plr_Login call server_playerLogin;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"dayzPlayerLogin = [];" \n
|
||||
@@ -729,10 +729,10 @@ class FSM
|
||||
"};" \n
|
||||
"" \n
|
||||
"dayzPlayerLogin2 = [];" \n
|
||||
"//[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
|
||||
"//[""PVDZE_plr_Login2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
|
||||
"" \n
|
||||
"dayzLogin2 = [_charID,player,_playerUID];" \n
|
||||
"publicVariableServer ""dayzLogin2"";" \n
|
||||
"PVDZE_plr_Login2 = [_charID,player,_playerUID];" \n
|
||||
"publicVariableServer ""PVDZE_plr_Login2"";" \n
|
||||
"" \n
|
||||
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
|
||||
"progressLoadingScreen 0.9;" \n
|
||||
@@ -1156,8 +1156,8 @@ class FSM
|
||||
name = "Initialize";
|
||||
init = /*%FSM<STATEINIT""">*/"#define ods(arg1) ""armaperflib"" callextension arg1" \n
|
||||
"" \n
|
||||
"if (!isNil ""dayzSetDate"") then {" \n
|
||||
" setDate dayzSetDate;" \n
|
||||
"if (!isNil ""PVDZE_plr_SetDate"") then {" \n
|
||||
" setDate PVDZE_plr_SetDate;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"if (!isNil ""dayzInfectedCamps"") then {" \n
|
||||
@@ -1165,7 +1165,7 @@ class FSM
|
||||
" dayzInfectedCamps spawn infectedcamps;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"diag_log (""Local Time: "" +str(dayzSetDate));" \n
|
||||
"diag_log (""Local Time: "" +str(PVDZE_plr_SetDate));" \n
|
||||
"" \n
|
||||
"//Medical" \n
|
||||
"dayz_medicalH = [] execVM ""\z\addons\dayz_code\medical\init_medical.sqf""; //Medical Monitor Script (client only)" \n
|
||||
@@ -1272,7 +1272,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="ERROR__No_Date_or";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNil ""dayzSetDate"""/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNil ""PVDZE_plr_SetDate"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -1296,10 +1296,10 @@ class FSM
|
||||
init = /*%FSM<STATEINIT""">*/"dayzGearSave = true;" \n
|
||||
"dayz_myPosition = getPosATL player;" \n
|
||||
"" \n
|
||||
"//[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
|
||||
"//[""PVDZE_plr_LoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
|
||||
"" \n
|
||||
"dayzLoginRecord = [_playerUID,_charID,0];" \n
|
||||
"publicVariableServer ""dayzLoginRecord"";" \n
|
||||
"PVDZE_plr_LoginRecord = [_playerUID,_charID,0];" \n
|
||||
"publicVariableServer ""PVDZE_plr_LoginRecord"";" \n
|
||||
"" \n
|
||||
"endLoadingScreen;" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
|
||||
@@ -217,9 +217,9 @@ while {true} do {
|
||||
if ((time - dayz_damageCounter) > 180) then {
|
||||
if (!r_player_unconscious) then {
|
||||
dayz_canDisconnect = true;
|
||||
//["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
|
||||
dayzDiscoRem = getPlayerUID player;
|
||||
publicVariableServer "dayzDiscoRem";
|
||||
//["PVDZE_plr_DiscRem",getPlayerUID player] call callRpcProcedure;
|
||||
PVDZE_plr_DiscRem = getPlayerUID player;
|
||||
publicVariableServer "PVDZE_plr_DiscRem";
|
||||
|
||||
//Ensure Control is hidden
|
||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||
@@ -236,15 +236,15 @@ while {true} do {
|
||||
//Save Checker
|
||||
if (dayz_unsaved) then {
|
||||
if ((time - dayz_lastSave) > _saveTime) then {
|
||||
dayzPlayerSave = [player,dayz_Magazines,false,false];
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
PVDZE_plr_Save = [player,dayz_Magazines,false,false];
|
||||
publicVariableServer "PVDZE_plr_Save";
|
||||
|
||||
dayz_unsaved = false;
|
||||
|
||||
//diag_log format["Save Checker: %1", dayzPlayerSave];
|
||||
//diag_log format["Save Checker: %1", PVDZE_plr_Save];
|
||||
|
||||
if (isServer) then {
|
||||
dayzPlayerSave call server_playerSync;
|
||||
PVDZE_plr_Save call server_playerSync;
|
||||
};
|
||||
|
||||
dayz_lastSave = time;
|
||||
|
||||
@@ -8,10 +8,10 @@ diag_log ("HIVE: Player Death list Request by ClientID: "+ str(_clientID));
|
||||
diag_log(PlayerDeaths);
|
||||
#endif
|
||||
|
||||
dayzPlayerDeathsResult = PlayerDeaths;
|
||||
PVDZE_plr_DeathBResult = PlayerDeaths;
|
||||
|
||||
if(!isNull _character) then {
|
||||
_clientID publicVariableClient "dayzPlayerDeathsResult";
|
||||
_clientID publicVariableClient "PVDZE_plr_DeathBResult";
|
||||
};
|
||||
|
||||
PlayerDeaths
|
||||
@@ -250,5 +250,5 @@ _playerObj setVariable ["lastTime",time];
|
||||
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
PVDZE_plr_Login = null;
|
||||
PVDZE_plr_Login2 = null;
|
||||
@@ -26,6 +26,6 @@ _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
|
||||
// Test disabling simulation server side on buildables only.
|
||||
_object enableSimulation false;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
|
||||
//diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
|
||||
|
||||
@@ -56,7 +56,7 @@ _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _da
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
_key call server_hiveWrite;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
|
||||
// Switched to spawn so we can wait a bit for the ID
|
||||
[_object,_uid,_fuel,_damage,_array,_characterID,_class] spawn {
|
||||
@@ -115,8 +115,8 @@ dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
_object call fnc_veh_ResetEH;
|
||||
|
||||
// testing - should make sure everyone has eventhandlers for vehicles was unused...
|
||||
dayzVehicleInit = _object;
|
||||
publicVariable "dayzVehicleInit";
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
|
||||
};
|
||||
@@ -95,13 +95,13 @@ _key call server_hiveWrite;
|
||||
deleteVehicle _object_para;
|
||||
};
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
|
||||
// for non JIP users this should make sure everyone has eventhandlers for vehicles.
|
||||
dayzVehicleInit = _object;
|
||||
publicVariable "dayzVehicleInit";
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
|
||||
};
|
||||
@@ -75,7 +75,7 @@ while {true} do {
|
||||
_crash setPos _adjustedPos;
|
||||
|
||||
// I don't think this is needed (you can't get "in" a crash), but it was in the original DayZ Crash logic
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_crash];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash];
|
||||
|
||||
_crash setVariable ["ObjectID","1",true];
|
||||
|
||||
@@ -90,9 +90,9 @@ while {true} do {
|
||||
};
|
||||
|
||||
if (_spawnFire) then {
|
||||
//["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
|
||||
dayzFire = [_crash,2,time,false,_fadeFire];
|
||||
publicVariable "dayzFire";
|
||||
//["PVDZE_obj_Fire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
|
||||
PVDZE_obj_Fire = [_crash,2,time,false,_fadeFire];
|
||||
publicVariable "PVDZE_obj_Fire";
|
||||
_crash setvariable ["fadeFire",_fadeFire,true];
|
||||
};
|
||||
|
||||
|
||||
@@ -45,6 +45,6 @@ _object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
|
||||
// Test disabling simulation server side on buildables only.
|
||||
_object enableSimulation false;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
|
||||
//diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
|
||||
|
||||
@@ -39,7 +39,7 @@ if(isNil "_retrader") then {
|
||||
};
|
||||
|
||||
// diag_log(_retrader);
|
||||
dayzTraderMenuResult = _retrader;
|
||||
PVDZE_plr_TradeMenuResult = _retrader;
|
||||
if(!isNull _character) then {
|
||||
_clientID publicVariableClient "dayzTraderMenuResult";
|
||||
_clientID publicVariableClient "PVDZE_plr_TradeMenuResult";
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
//register client->server rpc
|
||||
registerServerRpc = {
|
||||
if (isServer) then {
|
||||
_this call registerBroadcastRpc;
|
||||
};
|
||||
};
|
||||
|
||||
["dayzDeath", { (_this select 1) call server_playerDied; } ] call registerServerRpc;
|
||||
["dayzDiscoAdd", { dayz_disco set [count dayz_disco,(_this select 1)]; } ] call registerServerRpc;
|
||||
["dayzDiscoRem", { dayz_disco = dayz_disco - [(_this select 1)]; } ] call registerServerRpc;
|
||||
["dayzPlayerSave", { (_this select 1) call server_playerSync; } ] call registerServerRpc;
|
||||
["dayzPublishObj", { (_this select 1) call server_publishObj; } ] call registerServerRpc;
|
||||
["dayzUpdateVehicle", { (_this select 1) call server_updateObject; } ] call registerServerRpc;
|
||||
["dayzDeleteObj", { (_this select 1) call server_deleteObj; } ] call registerServerRpc;
|
||||
["dayzLogin", { (_this select 1) call server_playerLogin; } ] call registerServerRpc;
|
||||
["dayzLogin2", { (_this select 1) call server_playerSetup; } ] call registerServerRpc;
|
||||
//missing sqf for server_playerMorph
|
||||
//["dayzPlayerMorph", { (_this select 1) call server_playerMorph; } ] call registerServerRpc;
|
||||
["dayzLoginRecord", { (_this select 1) call dayz_recordLogin; } ] call registerServerRpc;
|
||||
["dayzCharDisco", { (_this select 1) call server_characterSync; } ] call registerServerRpc;
|
||||
["dayzSpawnZed", { (_this select 1) call server_handleZedSpawn; } ] call registerServerRpc;
|
||||
// DayZ Epoch Custom
|
||||
["dayzPublishVeh", { (_this select 1) spawn server_publishVeh; } ] call registerServerRpc;
|
||||
["dayzTradeObject", { (_this select 1) spawn server_tradeObj; } ] call registerServerRpc;
|
||||
["dayzTraderMenu", { (_this select 1) spawn server_traders; } ] call registerServerRpc;
|
||||
["dayzPlayerDeaths", { (_this select 1) spawn server_deaths; } ] call registerServerRpc;
|
||||
|
||||
@@ -47,7 +47,7 @@ if (_spawnRoll <= _spawnChance) then {
|
||||
_crash setPos _adjustedPos;
|
||||
|
||||
// I don't think this is needed (you can't get "in" a crash), but it was in the original DayZ Crash logic
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_crash];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash];
|
||||
|
||||
_crash setVariable ["ObjectID","1",true];
|
||||
|
||||
@@ -62,9 +62,9 @@ if (_spawnRoll <= _spawnChance) then {
|
||||
};
|
||||
|
||||
if (_spawnFire) then {
|
||||
//["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
|
||||
dayzFire = [_crash,2,time,false,_fadeFire];
|
||||
publicVariable "dayzFire";
|
||||
//["PVDZE_obj_Fire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
|
||||
PVDZE_obj_Fire = [_crash,2,time,false,_fadeFire];
|
||||
publicVariable "PVDZE_obj_Fire";
|
||||
_crash setvariable ["fadeFire",_fadeFire,true];
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ if (_spawnRoll <= _spawnChance) then {
|
||||
_crash setPos _position;
|
||||
|
||||
// I don't think this is needed (you can't get "in" a crash), but it was in the original DayZ Crash logic
|
||||
//dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_crash];
|
||||
//PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crash];
|
||||
|
||||
//_crash setVariable ["ObjectID","1",true];
|
||||
|
||||
|
||||
@@ -160,8 +160,8 @@ class FSM
|
||||
" };" \n
|
||||
"" \n
|
||||
" setDate _date;" \n
|
||||
" dayzSetDate = _date;" \n
|
||||
" publicVariable ""dayzSetDate"";" \n
|
||||
" PVDZE_plr_SetDate = _date;" \n
|
||||
" publicVariable ""PVDZE_plr_SetDate"";" \n
|
||||
" diag_log (""TIME SYNC: Local Time set to "" + str(_date)); " \n
|
||||
"};" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
@@ -208,7 +208,7 @@ class FSM
|
||||
name = "prepare";
|
||||
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: INITIALIZING CLEANUP SCRIPT"");" \n
|
||||
"" \n
|
||||
"_safety = dayz_serverObjectMonitor;" \n
|
||||
"_safety = PVDZE_serverObjectMonitor;" \n
|
||||
"//_dateNow = (DateToNumber date);" \n
|
||||
"" \n
|
||||
"_lastUpdate = diag_tickTime;" \n
|
||||
@@ -291,7 +291,7 @@ class FSM
|
||||
class vehicle_cleanup
|
||||
{
|
||||
name = "vehicle_cleanup";
|
||||
init = /*%FSM<STATEINIT""">*/"_safety = dayz_serverObjectMonitor;" \n
|
||||
init = /*%FSM<STATEINIT""">*/"_safety = PVDZE_serverObjectMonitor;" \n
|
||||
"" \n
|
||||
"//Check for hackers" \n
|
||||
" {" \n
|
||||
@@ -302,7 +302,7 @@ class FSM
|
||||
" };" \n
|
||||
" } forEach allUnits;" \n
|
||||
"" \n
|
||||
"dayz_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
|
||||
"PVDZE_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@ if(_outcome == "PASS") then {
|
||||
|
||||
if(isDedicated) then {
|
||||
setDate _date;
|
||||
dayzSetDate = _date;
|
||||
publicVariable "dayzSetDate";
|
||||
PVDZE_plr_SetDate = _date;
|
||||
publicVariable "PVDZE_plr_SetDate";
|
||||
};
|
||||
|
||||
diag_log ("HIVE: Local Time set to " + str(_date));
|
||||
@@ -268,7 +268,7 @@ if (isServer and isNil "sm_done") then {
|
||||
};
|
||||
|
||||
//Monitor the object
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
|
||||
};
|
||||
} forEach _objectArray;
|
||||
// # END OF STREAMING #
|
||||
|
||||
Reference in New Issue
Block a user