This is far from what I meant. Here is my script, but it does not want to serve the item in the player's inventory.
_items = items player;
_wanted = ["Item_FileTopSecret"];
if ( _wanted findIf { _x in _items } > -1 ) then {
if (isServer) then
{
if (isNil "isInside") then {isInside = false; publicVariable "isInside";};
missionComplete = false;
[] spawn
{
i = 0;
_timeScore = 1;
while {!missionComplete} do
{
if (isInside) then
{
i = i + 1;
} else
{
i = 0;
};
hint format["%1",isInside];
if (i >= _timeScore && alive Item_FileTopSecret) then
{
[[[], {[west, 'The documents were seized and delivered to the US base!'] call wmt_fnc_endmission;} ], 'bis_fnc_spawn'] call bis_fnc_MP;
[[[], {['The documents were seized and delivered to the US base!'] call WMT_fnc_ShowTaskNotification;} ], 'bis_fnc_spawn'] call bis_fnc_MP;
missionComplete = trig;
};
sleep 1;
};
};
};
};