Files
DayZ-Epoch/SQF/dayz_code/compile/epoch_tempKeys.sqf
ebaydayz 6a6db58291 Compiles.sqf cleanup
- Moved player_countMagazines to \compile\ folder
- Removed several unused and obsolete files
- Moved some epoch functions out of compiles.sqf into individual files
- Synced order and formatting with 1.8.7. Much easier to compare now.

Any changes I make to official DayZ Mod code and files I also submit as
a pull request to them.
2016-03-17 16:34:15 -04:00

14 lines
642 B
Plaintext

private ["_temp_keys","_temp_keys_names","_key_colors","_ownerKeyId","_ownerKeyName"];
_temp_keys = [];
_temp_keys_names = [];
// 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_names set [_ownerKeyId,_ownerKeyName];
_temp_keys set [count _temp_keys,str(_ownerKeyId)];
};
} count (items player);
[_temp_keys,_temp_keys_names]