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];
Question
webbie
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
PlayerScan5sinitplayerlocal.sqf
Thx in Advance.
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now