Jump to content
  • 0

init question


cerealspiller

Question

I am having issues getting the ground loot script to load with a missions script I've previously had working.  Can someone look at this and tell me why the init.sqf is not working?  I am guessing it has to do with the locations of the scripts and the }; or something...  please help :D

/*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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...