mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-22 20:12:20 +03:00
player_build.sqf Enhancements and PV renames
This commit is contained in:
@@ -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];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user