Commit e2e5536c authored by Razer's avatar Razer
Browse files

Added duplicate backpack check

parent c775f166
[player,["Take",50]] remoteExec ["say3D",allPlayers];
\ No newline at end of file
[player,["Take",50]] remoteExec ["say3D",allPlayers];
params ["_unit","_container","_item"];
// Is backpack (Check duplicate)
if (isClass (configFile >> "CfgVehicles" >> _item)) then {
if (isNull (backpackContainer player)) exitWith {};
if (!isNull DS_var_OpenedContainer && {DS_var_OpenedContainer != _container}) then {
// DUPLICATE
systemChat "Duplicate found";
removeBackpackGlobal player; // This also removes the ability to take the backpack from vehicle. (Even if shown in it)
// TODO, create action to take the backpack again? (Dont remove the backpack from game)
};
};
......@@ -2,7 +2,7 @@ params [["_player", objNull],["_container", objNull]];
[player,["BagClose",50]] remoteExec ["say3D",allPlayers];
DS_var_OpenedContainer = [];
DS_var_OpenedContainer = objNull;
_cType = typeof(_container);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment