main()
{
precacheModel("vehicle_cobra_helicopter_fly");
}
helicopter()
{
trig = getEnt( "heli_trig" , "targetname" ); // Best to place this below the players at spawn so they spawn in it
start = getEnt( "heli_spawn" , "targetname" );
first = getEnt( "first" , "targetname" );
second = getEnt( "second" , "targetname" );
third = getEnt( "third" , "targetname" );
fourth = getEnt( "fourth" , "targetname" );
fifth = getEnt( "fifth" , "targetname" );
while(true)
{
trig waittill("trigger", player);
trig delete();
chopper = spawn_helicopter( player, start.origin, start.angles, "cobra_mp", "vehicle_cobra_helicopter_fly" );
wait 0.05;
chopper playLoopSound( "mp_cobra_helicopter" );
chopper setDamageStage( 3 );
chopper setSpeed( 40, 15 , 5);
chopper setYawSpeed( 50, 20, 20 );
chopper setMaxPitchRoll( 30, 30 );
chopper setNearGoalNotifyDist( 96 );
wait 1;
chopper setVehGoalPos( start.origin, true );
chopper waittill("goal");
wait 2;
for(;;)
{
chopper setVehGoalPos( first.origin, true );
chopper waittill("goal");
wait 2;
chopper setVehGoalPos( second.origin, true );
chopper waittill("goal");
wait 2;
chopper setVehGoalPos( third.origin, true );
chopper waittill("goal");
wait 2;
chopper setVehGoalPos( fourth.origin, true );
chopper waittill("goal");
wait 2;
chopper setVehGoalPos( fifth.origin, true );
chopper waittill("goal");
wait 2;
}
}
}
spawn_helicopter( owner, origin, angles, model, targetname )
{
chopper = spawnHelicopter( owner, origin, angles, model, targetname );
return chopper;
}