mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-11 02:32:55 +03:00
Merge pull request #763 from dayz10k/master
minor fixes, more keyname stuff, owner remove modular
This commit is contained in:
@@ -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