mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #757 from dayz10k/master
#751 inv space of new mags & #749 key name of unlocking key
This commit is contained in:
@@ -130,7 +130,15 @@ class CfgMagazines {
|
||||
count = 100;
|
||||
picture = "\CA\weapons_E\Data\icons\m_m245_CA.paa";
|
||||
};
|
||||
|
||||
class 100Rnd_556x45_BetaCMag: CA_Magazine {
|
||||
type="256";
|
||||
}
|
||||
class 75Rnd_545x39_RPK: CA_Magazine {
|
||||
type="256";
|
||||
}
|
||||
class 100Rnd_556x45: CA_Magazine {
|
||||
type="256";
|
||||
}
|
||||
|
||||
// Items
|
||||
class ItemHotwireKit: CA_Magazine
|
||||
|
||||
@@ -79,6 +79,7 @@ class CfgWeapons {
|
||||
//Sniper Rifel
|
||||
//#include "CfgWeapons\Weapon\Sniper\AS50.hpp"
|
||||
#include "CfgWeapons\Weapon\Sniper\M107.hpp"
|
||||
#include "CfgWeapons\Weapon\Sniper\KSVK.hpp"
|
||||
|
||||
#include "CfgWeapons\Weapon\Sniper\DMR_DZ.hpp"
|
||||
// #include "CfgWeapons\Weapon\Sniper\DMR_DZ2.hpp"
|
||||
|
||||
4
SQF/dayz_code/Configs/CfgWeapons/Weapon/Sniper/KSVK.hpp
Normal file
4
SQF/dayz_code/Configs/CfgWeapons/Weapon/Sniper/KSVK.hpp
Normal file
@@ -0,0 +1,4 @@
|
||||
class ksvk;
|
||||
class KSVK_DZE:ksvk {
|
||||
type = "1";
|
||||
};
|
||||
@@ -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","_resultKeyname","_ownerIDname"];
|
||||
|
||||
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
|
||||
|
||||
@@ -233,6 +233,18 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
if(locked _cursorTarget) then {
|
||||
if(_hasKey or _oldOwner) then {
|
||||
_Unlock = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",_cursorTarget, 2, true, true, "", ""];
|
||||
|
||||
//return the key name which unlocked the vehicle adapted from Axe Cop
|
||||
_ownerIDname = parsenumber _ownerID;
|
||||
_resultKeyname = "ItemKey";
|
||||
if (_ownerIDname == 0) exitWith {cutText [format["%1 has ID 0 - No Key possible.",typeOF _cursorTarget], "PLAIN"];};
|
||||
if ((_ownerIDname > 0) && (_ownerIDname <= 2500)) then {_resultKeyname = format["ItemKeyGreen%1",_ownerIDname];};
|
||||
if ((_ownerIDname > 2500) && (_ownerIDname <= 5000)) then {_resultKeyname = format["ItemKeyRed%1",_ownerIDname-2500];};
|
||||
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"];};
|
||||
|
||||
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
|
||||
s_player_lockUnlock_crtl = 1;
|
||||
} else {
|
||||
@@ -877,4 +889,4 @@ if (_dogHandle > 0) then {
|
||||
s_player_speeddog = -1;
|
||||
player removeAction s_player_calldog;
|
||||
s_player_calldog = -1;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- ----------------------------
|
||||
-- This should be done
|
||||
-- ----------------------------
|
||||
INSERT INTO `trader_items` VALUES(771, 'KSVK', 3, 'Rifle Sniper', 'trade_weapons');
|
||||
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');
|
||||
@@ -33,7 +33,7 @@ INSERT INTO `Traders_DATA` VALUES(7376, '["MG36_camo",3]', 8, '[1,"ItemGoldBar10
|
||||
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",3]', 10, '[3,"ItemGoldBar10oz",1]', '[1,"ItemGoldBar10oz",1]', 0, 526, 'trade_weapons');
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user