Hi all,
I have created a player scan script however when I load into the server it does not work.
Wondering if I am missing something or I need to add something to epoch to make it run.
Ive tried it in the editor with epoch, SP and MP and it works.
I feel like it might have something to do with using player/playableUnits as the variable. Tried both.
I use infi as well. I dont think its an issue. Ive checked idd's etc
init.sqf and initplayerlocal.sqf
[] execVM "PlayerScan5sinitplayerlocal.sqf";
PlayerScan5sinitplayerlocal.sqf
GOM_fnc_scan = { params [["_scanObject",objNull],["_scanRadius",250],["_duration",5],["_debug",false]]; _scanObject setVariable ["GOM_fnc_scanActive",true,true]; if (_debug) then {systemChat "Scanning for Players!"}; hint "Scanning for Players!"; sleep 1; _stopTime = time + _duration; waitUntil { _nearPlayers = (_scanObject nearEntities _scanRadius) - [player] select {isPlayer _x}; hintsilent format ["Scanning: %1\nPlayers detected: %2",[-(time - _stopTime),"HH:MM"] call BIS_fnc_timeToString,count _nearPlayers]; time > _stopTime }; if (_debug) then {systemChat "Scanning Complete!"}; _scanObject setVariable ["GOM_fnc_scanActive",false,true]; hint "Scanning Complete!"; }; //add scan action to object player addAction ["Scan for Players",{ params ["_object","_caller","_ID"]; _scan = [_object,15,5] spawn GOM_fnc_scan; },[],0,true,true,"","_this isEqualTo vehicle _this AND !(_this getVariable ['GOM_fnc_scanActive',false])",5];
Thx in Advance.