mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
#749 unlock returns key name in cutText (WIP)
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"];
|
||||
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","_ownerKeyName","_temp_keyName"];
|
||||
|
||||
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
|
||||
|
||||
@@ -132,12 +132,15 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_itemsPlayer = items player;
|
||||
|
||||
_temp_keys = [];
|
||||
_temp_keyName = [];
|
||||
// find available keys
|
||||
_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
|
||||
{
|
||||
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then {
|
||||
_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid");
|
||||
_ownerKeyName = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
|
||||
_temp_keys set [count _temp_keys,str(_ownerKeyId)];
|
||||
_temp_keyName set [count _temp_keyNames, str(_ownerKeyName)];
|
||||
};
|
||||
} forEach _itemsPlayer;
|
||||
|
||||
@@ -877,4 +880,4 @@ if (_dogHandle > 0) then {
|
||||
s_player_speeddog = -1;
|
||||
player removeAction s_player_calldog;
|
||||
s_player_calldog = -1;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user