There are different ways to spawn a new aircraft. Via action is the simplest

.
To do so, create a new mission, place the Airgroup on the map, enable only script spawn in the Object Options (if you don't do that your Airgroup spawns at beginning of the mission and than again if you call it via action.Do()). Create an action for it in the script -> action tab, give a simple name for example SpawnEnemyPlane, select the airgroup to spawn. Then save and save the mission.
Add a flag to the cs file, to avoid multiple spawning of the airgroup
Code:
bool Spawned = false;
Then in your OnTickGame
Code:
if (I_Altitude > 400 && !Spawned)
{
Spawned = true;
GamePlay.gpHUDLogCenter("above 400");
AiAction action = GamePlay.gpGetAction("SpawnEnemyPlane"));
if (action != null)
{
action.Do();
}
}