mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
same
This commit is contained in:
@@ -54,7 +54,7 @@ if (_isOk) then {
|
||||
player addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_create == "MeleeHatchet") then {
|
||||
player addMagazine 'hatchet_swing';
|
||||
player addMagazine 'Hatchet_swing';
|
||||
};
|
||||
if (_create == "MeleeMachete") then {
|
||||
player addMagazine 'Machete_swing';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_invehicle","_isplayernearby","_object","_myGroup","_id","_playerID","_playerName","_characterID","_playerIDtoarray","_timeout","_message"];
|
||||
private ["_invehicle","_isplayernearby","_object","_myGroup","_id","_playerID","_playerName","_characterID","_playerIDtoarray","_timeout","_message","_magazines"];
|
||||
_playerID = _this select 0;
|
||||
_playerName = _this select 1;
|
||||
_object = call compile format["player%1",_playerID];
|
||||
@@ -40,7 +40,11 @@ if (!isNull _object) then {
|
||||
if (alive _object) then {
|
||||
|
||||
_isplayernearby = (DZE_BackpackGuard and!_invehicle and ({isPlayer _x} count (_object nearEntities ["AllVehicles", 5]) > 1));
|
||||
[_object,(magazines _object),true,true,_isplayernearby] call server_playerSync;
|
||||
|
||||
// prevent saving more than 20 magazine items
|
||||
_magazines = [(magazines _object),20] call array_reduceSize;
|
||||
|
||||
[_object,_magazines,true,true,_isplayernearby] call server_playerSync;
|
||||
|
||||
// maybe not needed just testing
|
||||
_object removeAllEventHandlers "MPHit";
|
||||
|
||||
Reference in New Issue
Block a user