mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
v0.4
fixes to typos, started removal of bandit / hero switching. New models now can carry backbacks, removed dupe issue but regained ammo dupe issue. DVS vehicle spawn limits introduced.
This commit is contained in:
@@ -64,20 +64,19 @@ switch (_item) do {
|
|||||||
case "Skin_Rocker2_DZ": {
|
case "Skin_Rocker2_DZ": {
|
||||||
_model = "Rocker2_DZ";
|
_model = "Rocker2_DZ";
|
||||||
};
|
};
|
||||||
|
|
||||||
case "Skin_Soldier1_DZ": {
|
case "Skin_Soldier1_DZ": {
|
||||||
_model = "Soldier1_DZ";
|
_model = "Soldier1_DZ";
|
||||||
};
|
};
|
||||||
case "Skin_Survivor2_DZ": {
|
case "Skin_Survivor2_DZ": {
|
||||||
_model = "Survivor2_DZ";
|
_model = "Survivor2_DZ";
|
||||||
if (_isBandit) then {
|
};
|
||||||
|
case "Skin_Bandit1_DZ": {
|
||||||
_model = "Bandit1_DZ";
|
_model = "Bandit1_DZ";
|
||||||
};
|
};
|
||||||
if (_isHero) then {
|
case "Skin_Survivor3_DZ": {
|
||||||
_model = "Survivor3_DZ";
|
_model = "Survivor3_DZ";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
if (_model != _myModel) then {
|
if (_model != _myModel) then {
|
||||||
player removeMagazine _item;
|
player removeMagazine _item;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ if (_qty >= _qty_in) then {
|
|||||||
dayzPublishVeh call server_publishVeh;
|
dayzPublishVeh call server_publishVeh;
|
||||||
};
|
};
|
||||||
|
|
||||||
cutText [format[("Bought %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
// Sell Vehicle
|
// Sell Vehicle
|
||||||
for "_x" from 1 to _qty_out do {
|
for "_x" from 1 to _qty_out do {
|
||||||
@@ -97,7 +97,7 @@ if (_qty >= _qty_in) then {
|
|||||||
s_player_parts_crtl = -1;
|
s_player_parts_crtl = -1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Error insufficient quality %1"),_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ if (_qty >= _qty_in) then {
|
|||||||
dayzPublishVeh call server_publishVeh;
|
dayzPublishVeh call server_publishVeh;
|
||||||
};
|
};
|
||||||
|
|
||||||
cutText [format[("Bought %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
// Sell Vehicle
|
// Sell Vehicle
|
||||||
for "_x" from 1 to _qty_out do {
|
for "_x" from 1 to _qty_out do {
|
||||||
@@ -97,7 +97,7 @@ if (_qty >= _qty_in) then {
|
|||||||
s_player_parts_crtl = -1;
|
s_player_parts_crtl = -1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Error insufficient quality %1"),_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ if (_qty >= _qty_in) then {
|
|||||||
s_player_parts_crtl = -1;
|
s_player_parts_crtl = -1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Error insufficient quality %1"),_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ if (_qty >= _qty_in) then {
|
|||||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||||
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Error insufficient quality %1"),_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ if (_qty >= _qty_in) then {
|
|||||||
s_player_parts_crtl = -1;
|
s_player_parts_crtl = -1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
cutText [format[("Error insufficient quality %1"),_textPartIn] , "PLAIN DOWN"];
|
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
dayzTradeResult = nil;
|
dayzTradeResult = nil;
|
||||||
|
|
||||||
|
|||||||
@@ -388,6 +388,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Pilot_EP1;
|
class Pilot_EP1;
|
||||||
class Pilot_EP1_DZ: Pilot_EP1 {
|
class Pilot_EP1_DZ: Pilot_EP1 {
|
||||||
@@ -400,6 +401,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Haris_Press_EP1;
|
class Haris_Press_EP1;
|
||||||
class Haris_Press_EP1_DZ: Haris_Press_EP1 {
|
class Haris_Press_EP1_DZ: Haris_Press_EP1 {
|
||||||
@@ -412,6 +414,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Ins_Soldier_GL;
|
class Ins_Soldier_GL;
|
||||||
class Ins_Soldier_GL_DZ: Ins_Soldier_GL {
|
class Ins_Soldier_GL_DZ: Ins_Soldier_GL {
|
||||||
@@ -424,6 +427,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class GUE_Commander;
|
class GUE_Commander;
|
||||||
class GUE_Commander_DZ: GUE_Commander {
|
class GUE_Commander_DZ: GUE_Commander {
|
||||||
@@ -436,6 +440,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Functionary1_EP1;
|
class Functionary1_EP1;
|
||||||
class Functionary1_EP1_DZ: Functionary1_EP1 {
|
class Functionary1_EP1_DZ: Functionary1_EP1 {
|
||||||
@@ -448,6 +453,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Priest;
|
class Priest;
|
||||||
class Priest_DZ: Priest {
|
class Priest_DZ: Priest {
|
||||||
@@ -460,6 +466,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
class Rocker2;
|
class Rocker2;
|
||||||
class Rocker2_DZ: Rocker2 {
|
class Rocker2_DZ: Rocker2 {
|
||||||
@@ -472,6 +479,7 @@ class Citizen1; // External class reference
|
|||||||
respawnMagazines[] = {};
|
respawnMagazines[] = {};
|
||||||
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072";
|
||||||
canHideBodies = 1;
|
canHideBodies = 1;
|
||||||
|
canCarryBackPack = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1041,49 +1041,49 @@ class CfgMagazines
|
|||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Police Officer Uniform";
|
displayName = "Police Officer Uniform";
|
||||||
descriptionShort = "Police Officer Uniform;
|
descriptionShort = "Police Officer Uniform";
|
||||||
};
|
};
|
||||||
class Skin_Pilot_EP1_DZ: SkinBase
|
class Skin_Pilot_EP1_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Pilot Uniform";
|
displayName = "Pilot Uniform";
|
||||||
descriptionShort = "Pilot Uniform;
|
descriptionShort = "Pilot Uniform";
|
||||||
};
|
};
|
||||||
class Skin_Haris_Press_EP1_DZ: SkinBase
|
class Skin_Haris_Press_EP1_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Press Uniform";
|
displayName = "Press Uniform";
|
||||||
descriptionShort = "Press Uniform;
|
descriptionShort = "Press Uniform";
|
||||||
};
|
};
|
||||||
class Skin_Ins_Soldier_GL_DZ: SkinBase
|
class Skin_Ins_Soldier_GL_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Terrorist Uniform";
|
displayName = "Terrorist Uniform";
|
||||||
descriptionShort = "Terrorist Uniform;
|
descriptionShort = "Terrorist Uniform";
|
||||||
};
|
};
|
||||||
class Skin_GUE_Commander_DZ: SkinBase
|
class Skin_GUE_Commander_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Rebel Uniform";
|
displayName = "Rebel Uniform";
|
||||||
descriptionShort = "Rebel Uniform;
|
descriptionShort = "Rebel Uniform";
|
||||||
};
|
};
|
||||||
class Skin_Functionary1_EP1_DZ: SkinBase
|
class Skin_Functionary1_EP1_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Business Suit";
|
displayName = "Business Suit";
|
||||||
descriptionShort = "Business Suit;
|
descriptionShort = "Business Suit";
|
||||||
};
|
};
|
||||||
class Skin_Priest_DZ: SkinBase
|
class Skin_Priest_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Priest Outfit";
|
displayName = "Priest Outfit";
|
||||||
descriptionShort = "Priest Outfit;
|
descriptionShort = "Priest Outfit";
|
||||||
};
|
};
|
||||||
class Skin_Rocker2_DZ: SkinBase
|
class Skin_Rocker2_DZ: SkinBase
|
||||||
{
|
{
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = "Rocker Outfit";
|
displayName = "Rocker Outfit";
|
||||||
descriptionShort = "Rebel Uniform;
|
descriptionShort = "Rebel Uniform";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ if (!isNull _object) then {
|
|||||||
{ [_x,"gear"] call server_updateObject } foreach
|
{ [_x,"gear"] call server_updateObject } foreach
|
||||||
(nearestObjects [getPosATL _object, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10]);
|
(nearestObjects [getPosATL _object, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10]);
|
||||||
if (alive _object) then {
|
if (alive _object) then {
|
||||||
[_object,[],true] call server_playerSync;
|
[_object,(magazines _object),true] call server_playerSync;
|
||||||
_myGroup = group _object;
|
_myGroup = group _object;
|
||||||
deleteVehicle _object;
|
deleteVehicle _object;
|
||||||
deleteGroup _myGroup;
|
deleteGroup _myGroup;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ if ( typeName(_this) == "OBJECT" ) then {
|
|||||||
|
|
||||||
_character = _this select 0;
|
_character = _this select 0;
|
||||||
_magazines = _this select 1;
|
_magazines = _this select 1;
|
||||||
_force = _this select 2;
|
//_force = _this select 2;
|
||||||
_force = true;
|
_force = true;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -171,21 +171,37 @@ RoadList = MarkerPosition nearRoads DynamicVehicleArea;
|
|||||||
BuildingList = MarkerPosition nearObjects ["House",DynamicVehicleArea];
|
BuildingList = MarkerPosition nearObjects ["House",DynamicVehicleArea];
|
||||||
|
|
||||||
spawn_vehicles = {
|
spawn_vehicles = {
|
||||||
private["_vehicle","_isAir","_isShip","_position","_roadlist","_buildinglist","_istoomany","_marker","_veh","_objPosition","_weights","_index","_uid"];
|
private["_vehicle","_isAir","_isShip","_position","_roadlist","_buildinglist","_istoomany","_marker","_veh","_objPosition","_weights","_index","_uid","_velimit","_counter"];
|
||||||
|
|
||||||
if (isDedicated) then {
|
if (isDedicated) then {
|
||||||
|
|
||||||
|
_counter = _this select 0;
|
||||||
|
|
||||||
waituntil {!isnil "fnc_buildWeightedArray"};
|
waituntil {!isnil "fnc_buildWeightedArray"};
|
||||||
|
|
||||||
_weights = [];
|
_weights = [];
|
||||||
_weights = [AllowedVehiclesList,AllowedVehiclesChance] call fnc_buildWeightedArray;
|
_weights = [AllowedVehiclesList,AllowedVehiclesChance] call fnc_buildWeightedArray;
|
||||||
|
|
||||||
|
_isOverLimit = true;
|
||||||
|
|
||||||
|
while {_isOverLimit} do {
|
||||||
|
|
||||||
waitUntil{!isNil "BIS_fnc_selectRandom"};
|
waitUntil{!isNil "BIS_fnc_selectRandom"};
|
||||||
// get index from fnc_buildWeightedArray
|
|
||||||
_index = _weights call BIS_fnc_selectRandom;
|
_index = _weights call BIS_fnc_selectRandom;
|
||||||
|
|
||||||
// select vehicle
|
|
||||||
_vehicle = AllowedVehiclesList select _index;
|
_vehicle = AllowedVehiclesList select _index;
|
||||||
|
_velimit = AllowedVehiclesLimit select _index;
|
||||||
|
|
||||||
|
_qty = {_x == _vehicle} count _counter;
|
||||||
|
|
||||||
|
// If under limit allow to proceed
|
||||||
|
if(_qty < _velimit) then {
|
||||||
|
_isOverLimit = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO add counter to stop after X attempts
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
// Find Vehicle Type to better control spawns
|
// Find Vehicle Type to better control spawns
|
||||||
_isAir = _vehicle isKindOf "Air";
|
_isAir = _vehicle isKindOf "Air";
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
dayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
|
dayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
|
||||||
dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
|
dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
|
||||||
|
|
||||||
|
_serverVehicleCounter = [];
|
||||||
|
|
||||||
if ((count playableUnits == 0) and !isDedicated) then {
|
if ((count playableUnits == 0) and !isDedicated) then {
|
||||||
isSinglePlayer = true;
|
isSinglePlayer = true;
|
||||||
};
|
};
|
||||||
@@ -165,6 +167,10 @@ diag_log "HIVE: Starting";
|
|||||||
};
|
};
|
||||||
_object call fnc_vehicleEventHandler;
|
_object call fnc_vehicleEventHandler;
|
||||||
_totalvehicles = _totalvehicles + 1;
|
_totalvehicles = _totalvehicles + 1;
|
||||||
|
|
||||||
|
// total each vehicle
|
||||||
|
_serverVehicleCounter set [count _serverVehicleCounter,_type];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Monitor the object
|
//Monitor the object
|
||||||
@@ -220,11 +226,12 @@ _vehLimit = MaxVehicleLimit - _totalvehicles;
|
|||||||
diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
|
diag_log ("HIVE: Spawning # of Vehicles: " + str(_vehLimit));
|
||||||
if(_vehLimit > 0) then {
|
if(_vehLimit > 0) then {
|
||||||
for "_x" from 1 to _vehLimit do {
|
for "_x" from 1 to _vehLimit do {
|
||||||
_id = [] spawn spawn_vehicles; // Needs setup
|
_id = [_serverVehicleCounter] spawn spawn_vehicles; // Needs setup
|
||||||
waitUntil{scriptDone _id};
|
waitUntil{scriptDone _id};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// spawn_roadblocks
|
// spawn_roadblocks
|
||||||
for "_x" from 1 to MaxDynamicDebris do {
|
for "_x" from 1 to MaxDynamicDebris do {
|
||||||
_id = [] spawn spawn_roadblocks;
|
_id = [] spawn spawn_roadblocks;
|
||||||
|
|||||||
Reference in New Issue
Block a user