mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-20 10:26:28 +03:00
Merge pull request #763 from dayz10k/master
minor fixes, more keyname stuff, owner remove modular
This commit is contained in:
@@ -131,14 +131,33 @@ class CfgMagazines {
|
||||
picture = "\CA\weapons_E\Data\icons\m_m245_CA.paa";
|
||||
};
|
||||
class 100Rnd_556x45_BetaCMag: CA_Magazine {
|
||||
scope = 2;
|
||||
displayName = "MG36 Mag.";
|
||||
ammo = "B_556x45_Ball";
|
||||
count = 100;
|
||||
initSpeed = 920;
|
||||
picture = "\ca\weapons\g36\data\equip\M_MG36_CA.paa";
|
||||
type="256";
|
||||
}
|
||||
tracersEvery = 4;
|
||||
lastRoundsTracer = 4;
|
||||
descriptionShort = "Caliber: 5.56x45 mm NATO
|
||||
Rounds: 100
|
||||
Used in: MG36, X8 SAW";
|
||||
};
|
||||
class 75Rnd_545x39_RPK: CA_Magazine {
|
||||
scope = 2;
|
||||
displayName = "75Rnd. RPK";
|
||||
ammo = "B_545x39_Ball";
|
||||
count = 75;
|
||||
type="256";
|
||||
}
|
||||
class 100Rnd_556x45: CA_Magazine {
|
||||
type="256";
|
||||
}
|
||||
picture = "\CA\weapons\AK\data\equip\M_RPK_74_CA.paa";
|
||||
tracersEvery = 4;
|
||||
lastRoundsTracer = 4;
|
||||
nameSound = "mgun";
|
||||
descriptionShort = "Caliber: 5.45x39mm
|
||||
Rounds: 75
|
||||
Used in: RPK-74";
|
||||
};
|
||||
|
||||
// Items
|
||||
class ItemHotwireKit: CA_Magazine
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle"];
|
||||
private ["_activatingPlayer","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_88") , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -31,6 +31,7 @@ _isDestructable = _obj isKindOf "BuiltItems";
|
||||
_isWreck = _objType in DZE_isWreck;
|
||||
_isRemovable = _objType in DZE_isRemovable;
|
||||
_isWreckBuilding = _objType in DZE_isWreckBuilding;
|
||||
_isModular = _objType isKindOf "ModularItems";
|
||||
|
||||
_limit = 3;
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then {
|
||||
@@ -65,6 +66,12 @@ _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName")
|
||||
|
||||
cutText [format[(localize "str_epoch_player_162"),_nameVehicle], "PLAIN DOWN"];
|
||||
|
||||
if (_isModular) then {
|
||||
//allow previous cutText to show, then show this if modular.
|
||||
sleep 2;
|
||||
{cutText [format["Deconstructing modular buildables will not refund any components."], "PLAIN"];};
|
||||
};
|
||||
|
||||
// Alert zombies once.
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
@@ -225,4 +232,4 @@ if (_proceed) then {
|
||||
};
|
||||
};
|
||||
TradeInprogress = false;
|
||||
s_player_deleteBuild = -1;
|
||||
s_player_deleteBuild = -1;
|
||||
|
||||
@@ -25,7 +25,7 @@ if(_buy_o_sell == "buy") then {
|
||||
_qty = {_x == _part_in} count magazines player;
|
||||
} else {
|
||||
|
||||
if (_part_in isKindOf "AIR") then {
|
||||
if (_part_in isKindOf "Air") then {
|
||||
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_air];
|
||||
} else {
|
||||
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle];
|
||||
@@ -226,4 +226,4 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
TradeInprogress = false;
|
||||
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE","_hasHotwireKit","_player_SurrenderedGear","_isSurrendered","_resultKeyname","_ownerIDname"];
|
||||
private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE","_hasHotwireKit","_player_SurrenderedGear","_isSurrendered","_resultKeyname","_resultKeyname2","_ownerIDname","_isModular"];
|
||||
|
||||
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
|
||||
|
||||
@@ -153,6 +153,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_isDestructable = _cursorTarget isKindOf "BuiltItems";
|
||||
_isWreck = _typeOfCursorTarget in DZE_isWreck;
|
||||
_isWreckBuilding = _typeOfCursorTarget in DZE_isWreckBuilding;
|
||||
_isModular = _cursorTarget isKindOf "ModularItems";
|
||||
|
||||
_isRemovable = _typeOfCursorTarget in DZE_isRemovable;
|
||||
_isDisallowRepair = _typeOfCursorTarget in ["M240Nest_DZ"];
|
||||
@@ -195,6 +196,13 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
};
|
||||
|
||||
//Allow owners to delete modulars
|
||||
if(_isModular and (_ownerID == dayz_playerUID)) then {
|
||||
if(_hasToolbox and "ItemCrowbar" in _itemsPlayer) then {
|
||||
_player_deleteBuild = true;
|
||||
};
|
||||
};
|
||||
|
||||
// CURSOR TARGET VEHICLE
|
||||
if(_isVehicle) then {
|
||||
|
||||
@@ -243,7 +251,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
if ((_ownerIDname > 5000) && (_ownerIDname <= 7500)) then {_resultKeyname = format["ItemKeyBlue%1",_ownerIDname-5000];};
|
||||
if ((_ownerIDname > 7500) && (_ownerIDname <= 10000)) then {_resultKeyname = format["ItemKeyYellow%1",_ownerIDname-7500];};
|
||||
if ((_ownerIDname > 10000) && (_ownerIDname <= 12500)) then {_resultKeyname = format["ItemKeyRed%1",_ownerIDname-10000];};
|
||||
{cutText [format["Key [%1] used to unlock vehicle.",_resultKeyname], "PLAIN"];};
|
||||
_resultKeyname2 = getText (configFile >> "CfgWeapons" >> _resultKeyname >> "displayName");
|
||||
{cutText [format["[%1] used to unlock vehicle.",_resultKeyname2], "PLAIN"];};
|
||||
|
||||
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
|
||||
Reference in New Issue
Block a user