Keep safe/lockbox vars server side until needed

The arrays for safes/lockboxes are kept on the server and when a client
goes to open the safe, a PV is sent to the server requesting the arrays.
Server sends info back.
This commit is contained in:
Matthew McConnell
2014-02-02 16:02:27 +00:00
parent bcc3d315ab
commit 2e08e53377
4 changed files with 46 additions and 7 deletions

View File

@@ -158,9 +158,9 @@ if (isServer and isNil "sm_done") then {
if (count _intentory > 0) then {
if (_type in DZE_LockedStorage) then {
// Fill variables with loot
_object setVariable ["WeaponCargo", (_intentory select 0), true];
_object setVariable ["MagazineCargo", (_intentory select 1), true];
_object setVariable ["BackpackCargo", (_intentory select 2), true];
_object setVariable ["WeaponCargo", (_intentory select 0)];
_object setVariable ["MagazineCargo", (_intentory select 1)];
_object setVariable ["BackpackCargo", (_intentory select 2)];
} else {
//Add weapons