mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 23:32:53 +03:00
0.76
add another female skin and bandit skins. Trader checks for inventory space for purchases
This commit is contained in:
@@ -20,31 +20,44 @@ if (_qty >= _qty_in) then {
|
||||
if(_buy_o_sell == "sell") then {
|
||||
_bos = 1;
|
||||
};
|
||||
|
||||
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
|
||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||
|
||||
if(dayzTradeResult == "PASS") then {
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_config = (configFile >> "cfgMagazines" >> _part_out);
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
} else {
|
||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||
_isOk = true;
|
||||
};
|
||||
dayzTradeResult = nil;
|
||||
|
||||
if (_isOk) then {
|
||||
|
||||
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
|
||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||
|
||||
if(dayzTradeResult == "PASS") then {
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||
};
|
||||
dayzTradeResult = nil;
|
||||
|
||||
|
||||
} else {
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
@@ -16,17 +16,29 @@ _qty = {_x == _part_in} count magazines player;
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_config = (configFile >> "cfgMagazines" >> _part_out);
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
} else {
|
||||
_isOk = true;
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
if (_isOk) then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
player removeMagazine _part_in;
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
|
||||
|
||||
@@ -23,41 +23,55 @@ if(_buy_o_sell == "buy") then {
|
||||
|
||||
if (_qty >= _qty_in) then {
|
||||
|
||||
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||
|
||||
if(dayzTradeResult == "PASS") then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player removeMagazine _part_in;
|
||||
} else {
|
||||
player removeWeapon _part_in;
|
||||
};
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player addWeapon _part_out;
|
||||
} else {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
if(_buy_o_sell == "buy") then {
|
||||
_config = (configFile >> "cfgWeapons" >> _part_out);
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
} else {
|
||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||
_isOk = true;
|
||||
};
|
||||
|
||||
|
||||
if (_isOk) then {
|
||||
|
||||
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||
|
||||
waitUntil {!isNil "dayzTradeResult"};
|
||||
|
||||
diag_log format["DEBUG Complete Trade: %1", dayzTradeResult];
|
||||
|
||||
if(dayzTradeResult == "PASS") then {
|
||||
|
||||
for "_x" from 1 to _qty_in do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player removeMagazine _part_in;
|
||||
} else {
|
||||
player removeWeapon _part_in;
|
||||
};
|
||||
};
|
||||
|
||||
for "_x" from 1 to _qty_out do {
|
||||
if(_buy_o_sell == "buy") then {
|
||||
player addWeapon _part_out;
|
||||
} else {
|
||||
player addMagazine _part_out;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
} else {
|
||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||
};
|
||||
dayzTradeResult = nil;
|
||||
} else {
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
};
|
||||
dayzTradeResult = nil;
|
||||
|
||||
} else {
|
||||
_needed = _qty_in - _qty;
|
||||
|
||||
@@ -482,8 +482,6 @@ class Citizen1; // External class reference
|
||||
canCarryBackPack = 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class BAF_Soldier_W;
|
||||
class Soldier1_DZ: BAF_Soldier_W {
|
||||
displayName = "Soldier";
|
||||
|
||||
@@ -6,13 +6,14 @@ BanditW1_DZ = "BanditW1_DZ";
|
||||
Survivor1_DZ = "Survivor2_DZ";
|
||||
Survivor2_DZ = "Survivor2_DZ";
|
||||
SurvivorW2_DZ = "SurvivorW2_DZ";
|
||||
SurvivorW3_DZ = "SurvivorW2_DZ";
|
||||
Sniper1_DZ = "Sniper1_DZ";
|
||||
Camo1_DZ = "Camo1_DZ";
|
||||
Soldier1_DZ = "Soldier1_DZ";
|
||||
Rocket_DZ = "Rocket_DZ";
|
||||
|
||||
AllPlayers = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"];
|
||||
AllPlayersVehicles = ["Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","AllVehicles"];
|
||||
AllPlayers = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest"];
|
||||
AllPlayersVehicles = ["SurvivorW3_DZ","Bandit1_DZ","BanditW1_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker2_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","AllVehicles"];
|
||||
|
||||
|
||||
PZombie_VB = "PZombie_VB";
|
||||
|
||||
Reference in New Issue
Block a user