if (isServer) then
{
    /* I define this as a function here so I don't need to cram
     * all that stuff into the parameter list. This is not strictly
     * needed, but usually a good idea */
    FHQ_EndMission = 
	{
        hint 'All in, go go go'; 
	  	sleep 10;
	    "WON" call BIS_fnc_EndMissionServer;  
	};
	
    /* This code should only run on the server */
    
    [units FHQ_playerGroup,			/* The units to extract... multiple groups can be extracted 
                                	 * with, for example (units group1 + units group2) */
                                  
    ["B_Heli_Light_01_F", 
	 "B_Heli_Attack_01_F"],			/* Class name of the extraction vehicle(s) */
	[true, false],					/* first true = B_Heli_Light_01_F will land, 
									 * second true = B_Heli_Attack_01_F will provide cover */
    getMarkerPos "markChopperSpawn",/* Position the extraction vehicle is created at */
    getMarkerPos "markExtract",		/* Pickup position */
    getMarkerPos "markChopperSpawn",/* Return to where it came from */
    "hint 'Chopper on the way';",	/* Code that is executed when the extraction vehicle is spawned */
    "hint 'Chopper has arrived';",	/* Code that is run when the vehicle reaches the extraction zone */
    "[] spawn FHQ_EndMission;"		/* Code that is run when units are loaded. Usually also used to 
                                     * end the mission */
    ] execvm "library\createExtraction.sqf";
};

/*

A simple example (one chopper) picking up guys p1 .. p4 would look like this:

[
	[p1, p2, p3, p4],
	"B_Heli_Light_01_F",
	[],
	getMarkerPos "markChopperSpawn",
    getMarkerPos "markExtract",
    getMarkerPos "markChopperSpawn",
	"hint 'Chopper on the way';",
    "hint 'Chopper has arrived';",
    "[] spawn FHQ_EndMission;"
] execvm "library\createExtraction.sqf";
*/