mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-17 13:42:57 +03:00
1.0.1.94 DEV BUILD
This commit is contained in:
@@ -13,16 +13,10 @@ waitUntil {!isNil "dayzPlayerDeathsResult"};
|
||||
|
||||
//diag_log format["DEBUG Death: %1", dayzPlayerDeathsResult];
|
||||
|
||||
/*
|
||||
if((count dayzPlayerDeathsResult) > 0) then {
|
||||
"Recent Player Deaths:" hintC dayzPlayerDeathsResult;
|
||||
// load death message board ui
|
||||
call EpochDeathBoardLoad;
|
||||
} else {
|
||||
"Recent Player Deaths:" hintC "No recent Deaths.";
|
||||
};
|
||||
*/
|
||||
|
||||
// load death message board ui
|
||||
call EpochDeathBoardLoad;
|
||||
|
||||
// Clear Data maybe consider cacheing results
|
||||
// dayzPlayerDeathsResult = nil;
|
||||
cutText ["No recent Deaths.", "PLAIN DOWN"];
|
||||
dayzPlayerDeathsResult = nil;
|
||||
};
|
||||
@@ -2,7 +2,7 @@
|
||||
DayZ Base Building
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText"];
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -29,6 +29,11 @@ _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >>
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||
|
||||
_lockable = 0;
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then {
|
||||
_lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable");
|
||||
};
|
||||
|
||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||
|
||||
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
|
||||
@@ -100,32 +105,29 @@ if (_hasrequireditem) then {
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
|
||||
|
||||
// get inital players position
|
||||
_location1 = getPosATL player;
|
||||
_dir = getDir player;
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)];
|
||||
// hintSilent str (_position);
|
||||
|
||||
// if ghost preview available use that instead
|
||||
if (_ghost == "") then {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPos _position;
|
||||
_object attachTo [player];
|
||||
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
|
||||
|
||||
if(_counter == 0) then {
|
||||
// get inital players position
|
||||
_location1 = getPosATL player;
|
||||
_dir = getDir player;
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)];
|
||||
hintSilent str (_position);
|
||||
|
||||
// if ghost preview available use that instead
|
||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||
if (_ghost == "") then {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPos _position;
|
||||
_object attachTo [player];
|
||||
};
|
||||
|
||||
_zheightchanged = false;
|
||||
|
||||
if (DZE_Q) then {
|
||||
@@ -136,38 +138,42 @@ if (_hasrequireditem) then {
|
||||
if (DZE_Z) then {
|
||||
DZE_Z = false;
|
||||
DZE_BuildingZ = DZE_BuildingZ - 0.1;
|
||||
|
||||
_zheightchanged = true;
|
||||
};
|
||||
|
||||
if(_zheightchanged) then {
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
|
||||
_dir = getDir player;
|
||||
_rotate = false;
|
||||
|
||||
if (DZE_4) then {
|
||||
_rotate = true;
|
||||
DZE_4 = false;
|
||||
_dir = 180;
|
||||
};
|
||||
if (DZE_6) then {
|
||||
_rotate = true;
|
||||
DZE_6 = false;
|
||||
_dir = 0;
|
||||
};
|
||||
|
||||
if(_rotate) then {
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)+DZE_BuildingZ];
|
||||
|
||||
hintSilent str (_position);
|
||||
|
||||
// if ghost preview available use that instead
|
||||
|
||||
if (_ghost == "") then {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPos _position;
|
||||
};
|
||||
|
||||
if(_zheightchanged) then {
|
||||
detach _object;
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)+DZE_BuildingZ];
|
||||
|
||||
_object setDir (getDir _object);
|
||||
_object setPos _position;
|
||||
_object attachTo [player];
|
||||
};
|
||||
|
||||
cutText ["Planning construction numpad 8 = up, numpad 2 = down, and numpad 5 to start building.", "PLAIN DOWN"];
|
||||
|
||||
_location0 = getPosATL player;
|
||||
|
||||
sleep 1;
|
||||
|
||||
_location2 = getPosATL player;
|
||||
@@ -175,13 +181,14 @@ if (_hasrequireditem) then {
|
||||
if(DZE_5) exitWith {
|
||||
_isOk = false;
|
||||
detach _object;
|
||||
_dir = getDir _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
if(_location1 distance _location2 > 5) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Moving to fast.";
|
||||
_reason = "Moving too fast.";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
@@ -207,13 +214,9 @@ if (_hasrequireditem) then {
|
||||
|
||||
_classname = _classnametmp;
|
||||
|
||||
|
||||
|
||||
|
||||
// Start Build
|
||||
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_dir = getDir player;
|
||||
_tmpbuilt setdir _dir;
|
||||
|
||||
// Get position based on player
|
||||
@@ -304,11 +307,64 @@ if (_hasrequireditem) then {
|
||||
|
||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||
|
||||
_tmpbuilt setVariable ["characterID",dayz_characterID,true];
|
||||
|
||||
//["dayzPublishObj",[dayz_characterID,_tmpbuilt,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
dayzPublishObj = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
_tmpbuilt setVariable ["OEMPos",_location,true];
|
||||
|
||||
if(_lockable > 1) then {
|
||||
|
||||
switch (_lockable) do {
|
||||
|
||||
case 2: { // 2 lockbox
|
||||
_combination_1 = (floor(random 3)) + 100; // 100=red,101=green,102=blue
|
||||
_combination_2 = floor(random 10);
|
||||
_combination_3 = floor(random 10);
|
||||
_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
|
||||
|
||||
if (_combination_1 == 100) then {
|
||||
_combination_1_Display = "Red";
|
||||
};
|
||||
if (_combination_1 == 101) then {
|
||||
_combination_1_Display = "Green";
|
||||
};
|
||||
if (_combination_1 == 102) then {
|
||||
_combination_1_Display = "Blue";
|
||||
};
|
||||
_combinationDisplay = format["%1%2%3",_combination_1_Display,_combination_2,_combination_3];
|
||||
};
|
||||
|
||||
case 3: { // 3 combolock
|
||||
_combination_1 = floor(random 10);
|
||||
_combination_2 = floor(random 10);
|
||||
_combination_3 = floor(random 10);
|
||||
_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
|
||||
_combinationDisplay = _combination;
|
||||
};
|
||||
|
||||
case 4: { // 4 safe
|
||||
_combination_1 = floor(random 10);
|
||||
_combination_2 = floor(random 10);
|
||||
_combination_3 = floor(random 10);
|
||||
_combination_4 = floor(random 10);
|
||||
_combinationDisplay = _combination;
|
||||
_combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
|
||||
};
|
||||
};
|
||||
|
||||
_tmpbuilt setVariable ["CharacterID",_combination,true];
|
||||
|
||||
|
||||
dayzPublishObj = [_combination,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
|
||||
cutText [format["You have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5];
|
||||
|
||||
|
||||
} else {
|
||||
_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
|
||||
|
||||
dayzPublishObj = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
};
|
||||
|
||||
|
||||
} else {
|
||||
deleteVehicle _tmpbuilt;
|
||||
|
||||
129
SQF/dayz_code/actions/player_buildingMaint.sqf
Normal file
129
SQF/dayz_code/actions/player_buildingMaint.sqf
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
DayZ Base Building Maintenance
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Upgrade already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_maint_build;
|
||||
s_player_maint_build = 1;
|
||||
|
||||
// get cursortarget from addaction
|
||||
_obj = _this select 3;
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
|
||||
// Find display name
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
|
||||
// Find next maintain
|
||||
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "maintainBuilding");
|
||||
|
||||
if ((count _upgrade) > 0) then {
|
||||
_requirements = _upgrade;
|
||||
} else {
|
||||
_requirements = [["PartGeneric",1]];
|
||||
};
|
||||
|
||||
_missingQty = 0;
|
||||
_missing = "";
|
||||
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
} forEach _requirements;
|
||||
|
||||
if (_proceed) then {
|
||||
|
||||
_temp_removed_array = [];
|
||||
_removed_total = 0;
|
||||
_tobe_removed_total = 0;
|
||||
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _requirements;
|
||||
|
||||
// all parts removed proceed
|
||||
if (_tobe_removed_total == _removed_total) then {
|
||||
|
||||
// Get position
|
||||
_location = _obj getVariable["OEMPos",(getposATL _obj)];
|
||||
|
||||
// Get direction
|
||||
_dir = getDir _obj;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
// Find CharacterID
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
// Create new object
|
||||
_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Set direction
|
||||
_object setDir _dir;
|
||||
|
||||
// Set location
|
||||
_object setPos _location;
|
||||
|
||||
// Remove old object
|
||||
deleteVehicle _obj;
|
||||
|
||||
// Delete object from database
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
// Publish variables
|
||||
_object setVariable ["CharacterID",_objectCharacterID,true];
|
||||
_object setVariable ["ObjectID",_objectID,true];
|
||||
_object setVariable ["ObjectUID",_objectUID,true];
|
||||
_object setVariable ["OEMPos",_location,true];
|
||||
|
||||
dayzPublishObj = [_objectCharacterID,_object,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
|
||||
cutText [format["You have repaired %1.",_text], "PLAIN DOWN", 5];
|
||||
|
||||
player reveal _object;
|
||||
|
||||
} else {
|
||||
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
|
||||
TradeInprogress = false;
|
||||
s_player_maint_build = -1;
|
||||
@@ -74,7 +74,7 @@ player setVariable["USEC_BloodQty",r_player_blood,true];
|
||||
player setVariable["medForceUpdate",true];
|
||||
|
||||
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||
dayzPlayerSave = [player,[],true];
|
||||
dayzPlayerSave = [player,[],true,true];
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
|
||||
dayz_lastMeal = time;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
DayZ Fishing
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
Made for DayZ Mod please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_itemOut","_position","_isOk","_counter"];
|
||||
private ["_itemOut","_position","_isOk","_counter","_rnd","_item","_itemtodrop","_vehicle","_inVehicle"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Fishing already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -46,7 +46,6 @@ while {_isOk} do {
|
||||
_rnd = 50;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// 1% chance to catch anything
|
||||
if((random _rnd) <= 1) then {
|
||||
@@ -61,7 +60,6 @@ while {_isOk} do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
cutText ["You caught a fish.", "PLAIN DOWN"];
|
||||
_isOk = false;
|
||||
} else {
|
||||
|
||||
@@ -5,8 +5,8 @@ _action = _this select 2;
|
||||
|
||||
_caller removeAction _action;
|
||||
|
||||
_callerID = _caller getVariable "characterID";
|
||||
_targetID = _target getVariable "characterID";
|
||||
_callerID = _caller getVariable "CharacterID";
|
||||
_targetID = _target getVariable "CharacterID";
|
||||
|
||||
_friendlies = _caller getVariable ["friendlies", []];
|
||||
_friendlies set [count _friendlies, _targetID];
|
||||
|
||||
151
SQF/dayz_code/actions/player_upgrade.sqf
Normal file
151
SQF/dayz_code/actions/player_upgrade.sqf
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
DayZ Base Building Upgrades
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_objectCharacterID"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Upgrade already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = 1;
|
||||
|
||||
// get cursortarget from addaction
|
||||
_obj = _this select 3;
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
|
||||
// Find display name
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
|
||||
// Find next upgrade
|
||||
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "upgradeBuilding");
|
||||
|
||||
if ((count _upgrade) > 0) then {
|
||||
|
||||
_newclassname = _upgrade select 0;
|
||||
|
||||
_lockable = 0;
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _newclassname >> "lockable")) then {
|
||||
_lockable = getNumber(configFile >> "CfgVehicles" >> _newclassname >> "lockable");
|
||||
};
|
||||
|
||||
_requirements = _upgrade select 1;
|
||||
|
||||
_missingQty = 0;
|
||||
_missing = "";
|
||||
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
} forEach _requirements;
|
||||
|
||||
if (_proceed) then {
|
||||
|
||||
_temp_removed_array = [];
|
||||
_removed_total = 0;
|
||||
_tobe_removed_total = 0;
|
||||
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _requirements;
|
||||
|
||||
// all parts removed proceed
|
||||
if (_tobe_removed_total == _removed_total) then {
|
||||
|
||||
// Get position
|
||||
_location = _obj getVariable["OEMPos",(getposATL _obj)];
|
||||
|
||||
// Get direction
|
||||
_dir = getDir _obj;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
// Current charID
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
_classname = _newclassname;
|
||||
|
||||
// Create new object
|
||||
_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Set direction
|
||||
_object setDir _dir;
|
||||
|
||||
// Set location
|
||||
_object setPos _location;
|
||||
|
||||
// Remove old object
|
||||
deleteVehicle _obj;
|
||||
|
||||
// Delete object from database
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
if (_lockable == 3) then {
|
||||
|
||||
_combination_1 = floor(random 10);
|
||||
_combination_2 = floor(random 10);
|
||||
_combination_3 = floor(random 10);
|
||||
_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
|
||||
|
||||
_objectCharacterID = _combination;
|
||||
|
||||
cutText [format["You have upgraded %2. Combination is %1",_combination,_text], "PLAIN DOWN", 5];
|
||||
} else {
|
||||
cutText [format["You have upgraded %1.",_text], "PLAIN DOWN", 5];
|
||||
};
|
||||
|
||||
// Publish variables
|
||||
_object setVariable ["CharacterID",_objectCharacterID,true];
|
||||
_object setVariable ["ObjectID",_objectID,true];
|
||||
_object setVariable ["ObjectUID",_objectUID,true];
|
||||
_object setVariable ["OEMPos",_location,true];
|
||||
|
||||
dayzPublishObj = [_objectCharacterID,_object,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
|
||||
player reveal _object;
|
||||
|
||||
} else {
|
||||
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["No upgrades available", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
s_player_upgrade_build = -1;
|
||||
@@ -64,7 +64,7 @@ if(!(alive _item)) then {
|
||||
dayz_hunger = 0;
|
||||
|
||||
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||
dayzPlayerSave = [player,[],true];
|
||||
dayzPlayerSave = [player,[],true,false];
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
|
||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||
|
||||
@@ -56,7 +56,7 @@ if(_removed == _countIn) then {
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
player setVariable ["dogID", _fsmid];
|
||||
_dog setVariable ["fsm_handle", _fsmid];
|
||||
_dog setVariable ["characterID", dayz_characterID, true];
|
||||
_dog setVariable ["CharacterID", dayz_characterID, true];
|
||||
|
||||
cutText [format["Dog consumed %1, and is now tamed.",_textRemoved], "PLAIN DOWN"];
|
||||
} else {
|
||||
|
||||
@@ -57,7 +57,7 @@ if (!_isOk) then {
|
||||
player reveal _object;
|
||||
_location = getPosATL _object;
|
||||
|
||||
_object setVariable ["characterID",dayz_characterID,true];
|
||||
_object setVariable ["CharacterID",dayz_characterID,true];
|
||||
|
||||
//["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
|
||||
@@ -5,7 +5,12 @@ dayz_combination = "";
|
||||
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
|
||||
|
||||
if(!isNull dayz_selectedVault) then {
|
||||
_ok = createdialog "SafeKeyPad";
|
||||
|
||||
|
||||
|
||||
_ok = createdialog "KeypadUI";
|
||||
|
||||
// _ok = createdialog "SafeKeyPad";
|
||||
};
|
||||
|
||||
s_player_unlockvault = -1;
|
||||
@@ -156,7 +156,7 @@ if(!_cancel) then {
|
||||
// Format Combination
|
||||
_combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
|
||||
|
||||
_tent setVariable ["characterID",_combination,true];
|
||||
_tent setVariable ["CharacterID",_combination,true];
|
||||
_tent setVariable ["OEMPos",_location,true];
|
||||
|
||||
//["dayzPublishObj",[_combination,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
|
||||
|
||||
Reference in New Issue
Block a user