All pastes #538947 Raw Edit

Something

public text v1 · immutable
·published 2007-06-05 04:22 UTC
rendered paste body
/*
Replaces Mando AssignPlayers.sqf
Designed to be called by init_common.sqf or init.sqf
[this,200,1,3,1, True]execVM""Activate_MissileCM.sqf
*/




private ["_plane", "_mindistecm", "_typeecm","_NumOfCM","_ctrlmode","_radio","_eh0","_eh1"];
	
_plane	    = _this select 0;
_mindistecm = _this select 1;		// Minimun Distance to Deploy CM in Control Mode == Automatic
_typeecm    = _this select 2;		// Chaff(0)for Radar || Flares(1) for IR
_NumOfCM    = _this select 3;		// Number of Counter-Measures
_ctrlmode		=	_this select 4;		// Deployment Control Mode: Automatic(1) || Manual(2)
_radio      = _this select 5;		// Internal Cockpit Radio ON(1) or OFF(2)


if (((vehicle player) != _unit) && !(local Server)) exitwith 
	{
		If (ARMA_DEBUG_lvl>1) Then 
			{ [1,format ["VM_DeploymentControls.sqf-> Someone Just got in the driver seat of an Air Vehicle and it was not you:  _This = %1 Server = %2",_this,(local server)],"server"] call six_fTxRadio; Sleep 0.5; }; 
	};



If (ARMA_DEBUG_lvl>0) Then 
			{ [1,format ["VM_DeploymentControls.sqf->CM Controls Initiated...Unit = %1 Server = %2",_plane,(local server)],"server"] call six_fTxRadio; Sleep 0.5; };


If (ARMA_DEBUG_lvl>1) Then 
			{ [1,format ["VM_DeploymentControls.sqf-> _This = %1 Server = %2",_this,(local server)],"server"] call six_fTxRadio; Sleep 0.5; };


GetInInit = true;
PublicVariable "GetInInit";

//_plane = vehicle player;
hint "L. SHIFT -> Flares";

  	  	
switch (Enable_Mando_Missiles) do 
	{ 
		case 0: {_eh0 = [_plane,_mindistecm,_typeecm,_NumOfCM,_radio] spawn Mando_CM_DefenseSystems_BIS;}; 
	  case 1: {_eh1 = [_plane,_mindistecm,_typeecm,_NumOfCM,_ctrlmode,_radio] spawn Mando_CM_DefenseSystems;}; 
	};
	
	
			If (ARMA_DEBUG_lvl>0) Then 
			{ [1,format ["VM_DeploymentControls.sqf->CM Controls Initiated... Server = %1",(local server)],"server"] call six_fTxRadio; Sleep 0.5; };