mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
limits distance to object, as well as validating random auth key. added server_deleteObjDirect which is only for direct execution on the server, whereas server_deleteObj should be used for PVEH execution only
17 lines
642 B
Plaintext
17 lines
642 B
Plaintext
private ["_obj","_objectID","_objectUID"];
|
|
|
|
_obj = _this select 0;
|
|
_objectID = _obj getVariable ["ObjectID","0"];
|
|
_objectUID = _obj getVariable ["ObjectUID","0"];
|
|
|
|
if (isServer) then {
|
|
[_objectID,_objectUID,"__SERVER__",_obj] call server_deleteObjDirect;
|
|
} else {
|
|
if (count _this == 2) then {
|
|
//single use trap triggered, remove with no animation
|
|
//For normal remove let object_pickup.sqf perform deletion to ensure player has room in gear first, no others remove at same time and animation runs
|
|
PVDZ_obj_Destroy = [_objectID,_objectUID,player,_obj,DZE_AuthKey];
|
|
publicVariableServer "PVDZ_obj_Destroy";
|
|
deleteVehicle _obj;
|
|
};
|
|
}; |