mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Merge pull request #1062 from vbawol/PVSLockProcess
Done is Done, make the rest of it to a localSetVariable
This commit is contained in:
@@ -58,24 +58,9 @@ if(!isNull _obj) then {
|
||||
_holder setVariable["ObjectUID",_objectUID,true];
|
||||
_holder setVariable ["OEMPos", _pos, true];
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
// remove vault
|
||||
deleteVehicle _obj;
|
||||
PVDZE_obj_setlocalVars = [_obj,_holder];
|
||||
publicVariableServer "PVDZE_obj_setlocalVars";
|
||||
|
||||
// Fill variables with loot
|
||||
if (count _weapons > 0) then {
|
||||
_holder setVariable ["WeaponCargo", _weapons, true];
|
||||
};
|
||||
if (count _magazines > 0) then {
|
||||
_holder setVariable ["MagazineCargo", _magazines, true];
|
||||
};
|
||||
if (count _backpacks > 0) then {
|
||||
_holder setVariable ["BackpackCargo", _backpacks, true];
|
||||
};
|
||||
|
||||
cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
|
||||
};
|
||||
s_player_lockvault = -1;
|
||||
|
||||
@@ -63,7 +63,8 @@ if (isServer) then {
|
||||
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
|
||||
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
|
||||
|
||||
"PVDZE_obj_localVars" addPublicVariableEventHandler {(_this select 1) spawn server_getLocalObjVars};
|
||||
"PVDZE_obj_getlocalVars" addPublicVariableEventHandler {(_this select 1) spawn server_getLocalObjVars};
|
||||
"PVDZE_obj_setlocalVars" addPublicVariableEventHandler {(_this select 1) spawn server_setLocalObjVars};
|
||||
};
|
||||
|
||||
//Client only
|
||||
|
||||
@@ -914,4 +914,27 @@ server_getLocalObjVars = {
|
||||
|
||||
PVDZE_localVarsResult = _vals;
|
||||
(owner _player) publicVariableClient "PVDZE_localVarsResult";
|
||||
};
|
||||
|
||||
server_setLocalObjVars = {
|
||||
private ["_obj", "_holder", "_weapons", "_magazines", "_backpacks"];
|
||||
|
||||
_obj = _this select 0;
|
||||
_holder = _this select 1;
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
if (count _weapons > 0) then {
|
||||
_holder setVariable ["WeaponCargo", _weapons];
|
||||
};
|
||||
if (count _magazines > 0) then {
|
||||
_holder setVariable ["MagazineCargo", _magazines];
|
||||
};
|
||||
if (count _backpacks > 0) then {
|
||||
_holder setVariable ["BackpackCargo", _backpacks];
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user