mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +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;
|
||||
|
||||
@@ -1,39 +1,37 @@
|
||||
-- ----------------------------
|
||||
-- This should be done
|
||||
-- ----------------------------
|
||||
INSERT INTO `trader_items` VALUES(771, 'KSVK_DZE', 3, 'Rifle Sniper', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(772, '5Rnd_127x108_KSVK', 1, 'Ammo Rifle Sniper', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(773, 'Saiga12K', 3, 'Shotgun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(774, '8Rnd_B_Saiga12_74Slug', 1, 'Ammo Shotgun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(775, '8Rnd_B_Saiga12_74Pellets', 1, 'Ammo Shotgun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(776, 'bizon', 3, 'Sub Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(777, '64Rnd_9x19_Bizon', 1, 'Ammo SMG', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(778, 'M8_SAW', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(779, 'MG36', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(780, 'RPK_74', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(781, 'M60A4_EP1_DZE', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(782, 'm240_scoped_EP1_DZE', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(783, 'M249_m145_EP1', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(784, 'MG36_camo', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(785, '100Rnd_556x45_BetaCMag', 1, 'Ammo - Light Machine Gun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(786, '75Rnd_545x39_RPK', 1, 'Ammo - Light Machine Gun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(787, '100Rnd_556x45', 1, 'Ammo - Light Machine Gun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'KSVK_DZE', 3, 'Rifle Sniper', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '5Rnd_127x108_KSVK', 1, 'Ammo Rifle Sniper', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'Saiga12K', 3, 'Shotgun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '8Rnd_B_Saiga12_74Slug', 1, 'Ammo Shotgun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '8Rnd_B_Saiga12_74Pellets', 1, 'Ammo Shotgun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'bizon', 3, 'Sub Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '64Rnd_9x19_Bizon', 1, 'Ammo SMG', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'M8_SAW', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'MG36', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'RPK_74', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'M60A4_EP1_DZE', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'm240_scoped_EP1_DZE', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'M249_m145_EP1_DZE', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, 'MG36_camo', 3, 'Machine Gun', 'trade_weapons');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '100Rnd_556x45_BetaCMag', 1, 'Ammo - Light Machine Gun', 'trade_items');
|
||||
INSERT INTO `trader_items` VALUES(NULL, '75Rnd_545x39_RPK', 1, 'Ammo - Light Machine Gun', 'trade_items');
|
||||
|
||||
|
||||
-- -------------------------------------------------------------------------------------------------------------
|
||||
-- This needs flushed out more, as most is on black market (bizon, saiga should be on other vendors?)
|
||||
-- -------------------------------------------------------------------------------------------------------------
|
||||
INSERT INTO `Traders_DATA` VALUES(7370, '["M8_SAW",3]', 10, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7371, '["MG36",3]', 8, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7372, '["RPK_74",3]', 10, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7373, '["M60A4_EP1_DZE",3]', 5, '[2,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7374, '["m240_scoped_EP1_DZE",3]', 5, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7375, '["M249_m145_EP1_DZE",3]', 5, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7376, '["MG36_camo",3]', 8, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7377, '["100Rnd_556x45_BetaCMag",1]', 10, '[3,"ItemSilverBar10oz",1]', '[1,"ItemSilverBar10oz",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(7378, '["100Rnd_556x45",1]', 10, '[3,"ItemSilverBar10oz",1]', '[1,"ItemSilverBar10oz",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(7379, '["75Rnd_545x39_RPK",1]', 10, '[3,"ItemSilverBar10oz",1]', '[1,"ItemSilverBar10oz",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(7380, '["KSVK_DZE",3]', 10, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(7381, '["64Rnd_9x19_Bizon",1]', 10, '[2,"ItemSilverBar",1]', '[1,"ItemSilverBar",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(7382, '["5Rnd_127x108_KSVK",1]', 10, '[1,"ItemSilverBar10oz",1]', '[5,"ItemSilverBar",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(7380, '["bizon",3]', 10, '[1,"ItemGoldBar10oz",1]', '[5,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["M8_SAW",3]', 10, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["MG36",3]', 8, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["RPK_74",3]', 10, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["M60A4_EP1_DZE",3]', 5, '[2,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["m240_scoped_EP1_DZE",3]', 5, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["M249_m145_EP1_DZE",3]', 5, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["MG36_camo",3]', 8, '[1,"ItemGoldBar10oz",1]', '[6,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["100Rnd_556x45_BetaCMag",1]', 10, '[3,"ItemSilverBar10oz",1]', '[1,"ItemSilverBar10oz",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["75Rnd_545x39_RPK",1]', 10, '[3,"ItemSilverBar10oz",1]', '[1,"ItemSilverBar10oz",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["KSVK_DZE",3]', 10, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 526, 'trade_weapons');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["64Rnd_9x19_Bizon",1]', 10, '[2,"ItemSilverBar",1]', '[1,"ItemSilverBar",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["5Rnd_127x108_KSVK",1]', 10, '[1,"ItemSilverBar10oz",1]', '[5,"ItemSilverBar",1]', 0, 527, 'trade_items');
|
||||
INSERT INTO `Traders_DATA` VALUES(NULL, '["bizon",3]', 10, '[1,"ItemGoldBar10oz",1]', '[5,"ItemGoldBar",1]', 0, 526, 'trade_weapons');
|
||||
|
||||
Reference in New Issue
Block a user