This commit is contained in:
[VB]AWOL
2013-10-31 19:02:41 -05:00
parent c60d6f5f0f
commit ad1c90ee36
2 changed files with 7 additions and 3 deletions

View File

@@ -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';

View File

@@ -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";