Jump to content
  • 0

init.sqf help


cerealspiller

Question

I have always had either a mission, or ground loot working.. Never both..  Could someone please show me why this init.sqf file won't load both?  Where do I need to move the last part (ground loot script) to make it all execute properly?  Thanks in advance!!

/*This has to be added to the clients init*/
if(isDedicated)exitWith{};


fn_createMissionMarker ={ private["_create","_markerPos","_markerName","_marker"];
//_this = _this select 1;
_create = _this select 0;


if(!_create)then[{ //delete marker
if !(getMarkerColor "MissionMarker" == "")then{ //Only delete existing Marker
deleteMarkerLocal "MissionMarker";
}; 
},{ //else create marker
_markerPos = _this select 1;
_markerName = _this select 2;


_marker = createMarkerLocal ["MissionMarker", _markerPos];
_marker setMarkerPosLocal _markerPos;
_marker setMarkerTypeLocal "mil_destroy";  
_marker setMarkerTextLocal format["%1",_markerName];  
_marker setMarkerColorLocal "ColorRed";
_marker setMarkerDirLocal -30;
_marker setMarkerSizeLocal [1.5,1.5];
}];
};


if(!isNil "GlobalMissionMarker")then{GlobalMissionMarker call fn_createMissionMarker};
"GlobalMissionMarker" addPublicVariableEventHandler {_this select 1 call fn_createMissionMarker};
"GlobalHint" addPublicVariableEventHandler {hint parseText format["%1", _this select 1]};


//[]spawn{while{alive player}do{player allowDamage true;vehicle player allowDamage true;}};
};
if (isServer) then {
    fn_getBuildingstospawnLoot = compile preProcessFileLineNumbers "custom\LSpawner\fn_LSgetBuildingstospawnLoot.sqf";
    LSdeleter = compile preProcessFileLineNumbers "custom\LSpawner\LSdeleter.sqf";
    execVM "custom\LSpawner\Lootspawner.sqf";
};
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...