Files
DayZ-Epoch/SQF/dayz_code/compile/player_dumpBackpack.sqf
[VB]AWOL bf189761ad should fix backpack issues
This makes sure we only run on players and not the player as this
currently hides the backpack from the player that set it down and was
running on everyone zombies included.
2014-01-29 14:00:02 -06:00

20 lines
709 B
Plaintext

private ["_weapons","_magazines","_weaponscnt","_magazinescnt","_backpack"];
_backpack = nearestObject [player, "Bag_Base_EP1"];
if (!(isNull _backpack) and local _backpack) then {
_weapons = getWeaponCargo _backpack;
_magazines = getMagazineCargo _backpack;
_weaponscnt = count (_weapons select 0);
_magazinescnt = count (_magazines select 0);
if((_magazinescnt > 0) or (_weaponscnt > 0)) then {
/* PVS/PVC - Skaronator */
_pos = getPosATL player;
_inRange = _pos nearEntities ["CAManBase",300];
{
// run only on other players
if(isPlayer _x and _x != player) then {
PVDZE_send = [_x,"HideObj",[_backpack]];
publicVariableServer "PVDZE_send";
};
} forEach _inRange;
};
};