Post: TheUnkn0wns Missions put in order -Not 1 line!-
12-16-2010, 11:27 PM #1
Mr. DarkKV
League Champion
(adsbygoogle = window.adsbygoogle || []).push({}); Hey guys so after 2 hours staring at notepad putting TheUnkn0wns missions together, I did it...
Download link:

EDIT: New download link Happy

You must login or register to view this content.

Just open it with Notepad++

Note:
There might be some errors there because after 2 hours staring at my computer screen I'm exhausted!

If you don't know whats different about TheUnk0wns missions, its that the missions is all one line so I put in as normal missions are.

P.s: Thanks to TheUnkn0wn for releasing his patch Happy

5 Likes and 800 views.... wow Not Happy or Sad
(adsbygoogle = window.adsbygoogle || []).push({});

The following 7 users say thank you to Mr. DarkKV for this useful post:

Dryder, gamekilla, Kakashii, killerjohn, Shaarpy, Solid Snake, TONEY777
12-17-2010, 01:26 AM #11
jfed
Climbing up the ladder
Originally posted by DEREKTROTTER View Post
ive started putting my scripts on to one line, it stops all the noob editors Happy


lol and it saves space
12-17-2010, 01:30 AM #12
Blackstorm
Veni. Vidi. Vici.
LOL Dude, i think Unkn0wn made it one line for a reason... (noob proof Happy)

---------- Post added at 09:30 PM ---------- Previous post was at 09:29 PM ----------

Originally posted by DEREKTROTTER View Post
ive started putting my scripts on to one line, it stops all the noob editors Happy


How do you re-format the code into one line? Eek I've added a new menu, but can't seem to find a program that'll put the code back into one line... Only CSS Code Compressors, but they remove some characters that are needed, and it'll give a syntax error. :/ Help please.
12-17-2010, 01:46 AM #13
jfed
Climbing up the ladder
Originally posted by MecAj View Post
LOL Dude, i think Unkn0wn made it one line for a reason... (noob proof Happy)

---------- Post added at 09:30 PM ---------- Previous post was at 09:29 PM ----------



How do you re-format the code into one line? Eek I've added a new menu, but can't seem to find a program that'll put the code back into one line... Only CSS Code Compressors, but they remove some characters that are needed, and it'll give a syntax error. :/ Help please.


lol talking about noobs you need to do it manually.
12-17-2010, 03:33 AM #14
Blackstorm
Veni. Vidi. Vici.
Originally posted by jfed View Post
lol talking about noobs you need to do it manually.


LOL You're funny bro, you honestly think TheUnkn0wn took all his time to take out every non-needed space in his code? /facepalm

Literally it would take hours over hours to put the code in the format it once was in. Unkn0wn probably made a program to format it, then recompress. xD
12-17-2010, 04:33 AM #15
jfed
Climbing up the ladder
Originally posted by MecAj View Post
LOL You're funny bro, you honestly think TheUnkn0wn took all his time to take out every non-needed space in his code? /facepalm

Literally it would take hours over hours to put the code in the format it once was in. Unkn0wn probably made a program to format it, then recompress. xD


yes i think he did it takes about an hour to take out the spaces from a MADE patch but if your not adding them from scratch then it takes no time to take them out.
12-17-2010, 04:37 AM #16
Originally posted by DarkKV5869 View Post
Hey guys so after 2 hours staring at notepad putting TheUnkn0wns missions together, I did it...
Download link:

You must login or register to view this content.

Just open it with Notepad++

Note:
There might be some errors there because after 2 hours staring at my computer screen I'm exhausted!

If you don't know whats different about TheUnk0wns missions, its that the missions is all one line so I put in as normal missions are.

P.s: Thanks to TheUnkn0wn for releasing his patch Happy



Wat does this patch do ???. :wub:
12-17-2010, 07:49 AM #17
Originally posted by MecAj View Post
LOL You're funny bro, you honestly think TheUnkn0wn took all his time to take out every non-needed space in his code? /facepalm

Literally it would take hours over hours to put the code in the format it once was in. Unkn0wn probably made a program to format it, then recompress. xD


itsnothardtodeletewhitespacefromafile Eek

You don't need a program to do it..
12-17-2010, 08:55 AM #18
EliteMossy
TheDigitalBoard.com
Originally posted by Homer
itsnothardtodeletewhitespacefromafile Eek

You don't need a program to do it..


Infact, my V8 had hardly any spaces, if you remember correctly. It was not one line, but there was no blank lines and no unneeded spaces.
12-17-2010, 12:46 PM #19
BuC-ShoTz
TeamMvKâ?¢
Originally posted by DarkKV5869 View Post
Hey guys so after 2 hours staring at notepad putting TheUnkn0wns missions together, I did it...
Download link:

You must login or register to view this content.

Just open it with Notepad++

Note:
There might be some errors there because after 2 hours staring at my computer screen I'm exhausted!

If you don't know whats different about TheUnk0wns missions, its that the missions is all one line so I put in as normal missions are.

P.s: Thanks to TheUnkn0wn for releasing his patch Happy


wow 2 hours are you serious, you can do it in 1 minute.

_theunknown.gsc
    
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include common_scripts\utility;

WP(D,Z,P)
{
L=strTok(D,",");
for(i=0;i<L.size;i+=2)
{
B=spawn("script_model",self.origin+(int(L[i]),int(L[i+1]),Z));
if(!P)B.angles=(90,0,0);
B setModel("com_plasticcase_enemy");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
}
}
shootFrom(W,O,P)
{
E=vector_Scal(anglestoforward(O.angles),99999);
S=O.origin+vector_Scal(anglestoforward(O.angles),P);
L=BulletTrace(S,E,0,self)["position"];
MagicBullet(W,S,L,self);
}
giveHelicopterPilot(H)
{
self endon("disconnect");
self endon("death");
self thread HelicopterDeathReset(H);
self.Flying=1;
S=16;
H Vehicle_SetSpeed(1000,S);
Me = spawn("script_origin",self.origin);
Destination = spawn("script_origin",self.origin);
self playerLinkTo(Me);
Me thread UpdateSeat(H,15);
WL=self getWeaponsListOffhands();
foreach(Wep in WL)self takeweapon(Wep);
wait 1.5;
H.mg1 SetSentryOwner(self);
H.mg2 SetSentryOwner(self);
if(level.teamBased)
{
H.mg1 setTurretTeam(self.team);
H.mg2 setTurretTeam(self.team);
}
for(;Winky Winky
{
if(self.Flying)
{
forward = anglestoforward(self getPlayerAngles());
right = anglestoright(self getPlayerAngles());
up = anglestoup(self getPlayerAngles());
if(self FragButtonPressed())
{
pos = (forward[0]*S,forward[1]*S,forward[2]*S);
Destination.origin = Destination.origin+pos;
H setVehGoalPos(Destination.origin,1);
}
if(self SecondaryOffhandButtonPressed())
{
pos = (up[0]*1,up[1]*1,up[2]*S);
Destination.origin = Destination.origin+pos;
H setVehGoalPos(Destination.origin,1);
}
if(self UseButtonPressed())
{
pos = (up[0]*1,up[1]*1,up[2]*S);
Destination.origin = Destination.origin-pos;
H setVehGoalPos(Destination.origin,1);
}
if(H.Shoot)
{
H.mg1 ShootTurret();
H.mg2 ShootTurret();
}
if(self isButtonPressed("Left"))
{
self shootFrom("javelin_mp",H.mg1,S*4);
self shootFrom("javelin_mp",H.mg2,S*4);
}
if(self isButtonPressed("Up"))
{
forward=H.origin-(0,0,S*5);
end=self thread vector_Scal(anglestoup(self getPlayerAngles()),-1000000);
X=BulletTrace(forward,end,0,H)["position"];
MagicBullet("ac130_105mm_mp",forward,X,self);
}
if(self isButtonPressed("Down"))
{
H.Shoot=0;
if(H.AShoot)
{
H.AShoot=0;
}
else
{
H.AShoot=1;
}
self autoShootHelicopter(H);
}
if(!self.IsVIP)
{
if(self isButtonPressed("O"))
{
self autoShootDisable(H);
if(self.Flying)self.Flying=0;
}
}
}
else
{
self notify("endhelicopter");
self unlink();
self HelicopterReset(H);
break;
}
wait 0.05;
}
self.Flying=0;
self freezeControlsWrapper(0);
foreach(Wep in WL)self giveWeapon(Wep);
Me delete();
Destination delete();
}
InitHelicopter(H)
{
Z=randomint(9999);
for(;Winky Winky
{
if(!H.Pilot)
{
foreach(Pilot in level.players)
{
B=distance(GetHeliSeat(H,20),Pilot.origin);
if(B<150)
{
if(!Pilot.Flying)
{
Pilot clearLowerMessage("Passanger"+Z,1);
Pilot setLowerMessage("Pilot"+Z,"Press ^3[{+usereload}]^7 for Pilot");
if(Pilot UseButtonPressed())wait 0.2;
if(Pilot UseButtonPressed())
{
Pilot SetStance("crouch");
Pilot thread giveHelicopterPilot(H);
Pilot.Pilot=H;
H.Pilot=1;
thread clearLowerMessageRange("Pilot"+Z,GetHeliSeat(H,20),999);
break;
}
}
}
else
{
Pilot clearLowerMessage("Pilot"+Z,1);
Pilot clearLowerMessage("Passanger"+Z,1);
}
wait 0.01;
}
}
else if(!H.Passanger)
{
foreach(Passanger in level.players)
{
B=distance(GetHeliSeat(H,-20),Passanger.origin);
if(!H.Pilot)B=999;
if(B<150)
{
if(!Passanger.Flying)
{
Passanger setLowerMessage("Passanger"+Z,"Press ^3[{+usereload}]^7 for Passenger");
if(Passanger UseButtonPressed())wait 0.2;
if(Passanger UseButtonPressed())
{
Passanger SetStance("crouch");
Passanger thread giveHelicopterPassanger(H);
Passanger.Passanger=H;
H.Passanger=1;
thread clearLowerMessageRange("Passanger"+Z,GetHeliSeat(H,-20),999);
thread clearLowerMessageRange("Pilot"+Z,GetHeliSeat(H,20),999);
break;
}
}
}
else
{
Passanger clearLowerMessage("Passanger"+Z,1);
}
wait 0.01;
}
}
wait 0.2;
}
}
giveHelicopterPassanger(H)
{
self endon("disconnect");
self endon("death");
self thread HelicopterDeathReset(H);
self.Flying=1;
Me=spawn("script_origin",self.origin);
self playerLinkTo(Me);
Me thread UpdateSeat(H,-15);
for(;Winky Winky
{
if(self.Flying)
{
if(!self.IsVIP)
{
if(self isButtonPressed("Up"))
{
if(self.Flying)self.Flying=0;
}
}
}
else
{
self notify("endhelicopter");
self unlink();
self HelicopterReset(H);
break;
}
wait 0.1;
}
self.Flying=0;
Me delete();
}
CreateRandomWeaponBox(O,T)
{
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
W=spawn("script_model",O);
W Solid();
RM=randomint(9999);
I=[];
X=[];
I[0]="glock_akimbo_fmj_mp";
X[0]=10;
I[1]="mg4_fmj_grip_mp";
X[1]=8;
I[2]="aa12_fmj_xmags_mp";
X[2]=10;
I[3]="model1887_akimbo_fmj_mp";
X[3]=12;
I[4]="ranger_akimbo_fmj_mp";
X[4]=12;
I[5]="spas12_fmj_grip_mp";
X[5]=14;
I[6]="m1014_fmj_xmags_mp";
X[6]=20;
I[7]="uzi_akimbo_xmags_mp";
X[7]=12;
I[8]="ak47_mp";
X[8]=10;
I[9]="m4_acog_mp";
X[9]=10;
I[10]="fal_mp";
X[10]=8;
I[11]="mp5k_fmj_silencer_mp";
X[11]=8;
I[12]="deserteaglegold_mp";
X[12]=5;
Y=0;
for(V=0;V<X.size;V++)
{
Y+=X[V];
}
for(;Winky Winky
{
foreach(P in level.players)
{
wait 0.01;
if(IsDefined(T)&&P.pers["team"]!=T)continue;
R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Weapon [Cost: 300]");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);
if(P.bounty>299)
{
P.bounty-=400;
P notify("doCash");
RW="";
J=0;
G=randomint(Y);
for(V=0;V<X.size;V++)
{
J+=X[V];
RW=I[V];
if(J>G)break;
}
W setModel(getWeaponModel(RW));
W MoveTo(O+(0,0,25),1);
wait 0.2;
if(P GetWeaponsListPrimaries().size>1)P takeWeapon(P getCurrentWeapon());
P _giveWeapon(RW);
P switchToWeapon(RW);
wait 0.6;
W MoveTo(O,1);
wait 0.2;
W setModel("");
}
else
{
P iPrintlnBold("^1You DO NOT Have Enough Cash!");
wait 0.05;
}
}
}
else
{
P clearLowerMessage(RM,1);
}
}
}
}
CreateRandomPerkBox(O,T)
{
B=spawn("script_model",O);
B setModel("com_plasticcase_friendly");
B Solid();
B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
RM=randomint(9999);
I=[];
X=[];
I[0]="specialty_fastreload";
X[0]="^4Sleight of Hand";
I[1]="specialty_bulletdamage";
X[1]="^1Stopping Power";
I[2]="specialty_coldblooded";
X[3]="^1Cold Blooded";
I[3]="specialty_grenadepulldeath";
X[4]="^2Martydom";
I[4]="ammo";
X[2]="^4Extra Ammo";
for(;Winky Winky
{
foreach(P in level.players)
{
wait 0.01;
if(IsDefined(T)&&P.pers["team"]!=T)continue;
R=distance(O,P.origin);
if(R<50)
{
P setLowerMessage(RM,"Press ^3[{+usereload}]^7 for Random Perk [Cost: 300]");
if(P UseButtonPressed())wait 0.1;
if(P UseButtonPressed())
{
P clearLowerMessage(RM,1);
if(P.bounty>299)
{
P.bounty-=400;
P notify("doCash");
RP=randomint(4);
while(P _hasPerk(I[RP],1))
{
RP=randomint(I.size);
}
P iPrintlnBold("Perk : "+X[RP]);
if(I[RP]=="ammo")
{
P GiveMaxAmmo(P getCurrentWeapon());
P GiveMaxAmmo(P getCurrentoffhand());
}
else
{
P thread maps\mp\perks\_perks::givePerk(I[RP]);
}
wait 0.2;
}
else
{
P iPrintlnBold("^1You DO NOT Have Enough Cash!");
wait 0.05;
}
}
}
else
{
P clearLowerMessage(RM,1);
}
}
}
}
ZombiePerk(N,P)
{
if(N==0)
{
self.moveSpeedScaler=1.3;
self setMoveSpeedScale(self.moveSpeedScaler);
if(P)
{
wait 2;
self iPrintlnBold("^1Ability : Super Speed");
}
}
else if(N==1)
{
Wep="riotshield_mp";
self _giveWeapon(Wep);
self switchToWeapon(Wep);
if(P)
{
wait 2;
self iPrintlnBold("^1Ability : Riot Shield");
}
}
else
{
self maps\mp\perks\_perks::givePerk("throwingknife_mp");
if(P)
{
wait 2;
self iPrintlnBold("^1Ability : Throwing Knife");
}
}
}
JZGoldGun()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
W=self getCurrentWeapon();
if(W=="deserteaglegold_mp")
{
self.ExpAmmo=1;
}
else
{
self.ExpAmmo=0;
}
wait 0.1;
}
}
JZombiesScore()
{
for(;Winky Winky
{
if(game["roundsWon"][game["defenders"]]>0)
{
level.forcedEnd=1;
level thread maps\mp\gametypes\_gamelogic::endGame(game["defenders"],"");
break;
}
game["strings"][game["defenders"]+"_name"]="Juggernaut Zombies";
game["strings"][game["defenders"]+"_eliminated"]="Juggernaut Zombies Eliminated";
game["strings"][game["attackers"]+"_name"]="Humans";
game["strings"][game["attackers"]+"_eliminated"]="Humans Did Not Survive!";
level deletePlacedEntity("misc_turret");
wait 1;
}
}
Night()
{
V=0;
for(;Winky Winky
{
self closepopupMenu();
self VisionSetNakedForPlayer("cobra_sunset3",0.01);
wait 0.01;
V++;
}
}
JZombiesCash()
{
self endon("disconnect");
self endon("death");
self.bounty=100+(self.kills*200);
if(self isHost())self.bounty+=9999;
if(self.bounty>500)self iPrintlnBold("^2"+(self.bounty-500)+" BONUS CASH!");
for(;Winky Winky
{
self.cash destroy();
self.cash=NewClientHudElem(self);
self.cash.alignX="right";
self.cash.alignY="center";
self.cash.horzAlign="right";
self.cash.vertAlign="center";
self.cash.foreground=1;
self.cash.fontScale=1;
self.cash.font="hudbig";
self.cash.alpha=1;
self.cash.color=(1,1,1);
self.cash setText("Cash : "+self.bounty);
self waittill("doCash");
self.bounty+=100;
}
}
CTB()
{
WP("0,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",0,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",55,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",110,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",165,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",220,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",275,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",330,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",385,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",440,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",495,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",550,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",605,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",660,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",715,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",770,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",825,0);
WP("0,0,25,0,50,0,75,0,0,30,75,30,0,60,75,60,0,90,25,90,50,90,75,90",880,0);
WP("0,0,25,0,50,0,75,0,0,30,25,30,50,30,75,30,0,60,25,60,50,60,75,60,0,90,25,90,50,90,75,90",935,0);
}


_ac130.gsc
    
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\killstreaks\_theunkn0wn;

WalkingAC130(start)
{
self endon("disconnect");
self endon("death");
if(start)
{
self _giveWeapon("ac130_105mm_mp");
self _giveWeapon("ac130_40mm_mp");
self _giveWeapon("ac130_25mm_mp");
self SwitchToWeapon("ac130_105mm_mp");
}
else
{
level thread removeAC130Player(self,false);
}
}
ExplosiveAmmo()
{
self endon("disconnect");
self endon("death");
while(1)
{
self waittill("weapon_fired");
if(self.ExpAmmo)
{
if(self getCurrentWeapon()!="at4_mp")
{
AimPos=maps\mp\gametypes\_missions::GetCursorPos();
level.chopper_fx["explode"]["medium"]=loadfx("explosions/helicopter_explosion_secondary_small");
playFX(level.chopper_fx["explode"]["medium"],AimPos);
RadiusDamage(AimPos,250,9999,250,self);
}
}
}
}
doBoxes()
{
self endon("disconnect");
self endon("death");
while(1)
{
if(self.Boxes)
{
self ThermalVisionFOFOverlayOn();
}
wait 1;
}
}
AimBot()
{
self endon("death");
self endon("disconnect");
self thread maps\mp\gametypes\_missions::monitorShot();
for(;Winky Winky
{
if(self.AimBot)
{
aimAt=undefined;
AimAngle=undefined;
TempAngle=undefined;
DoShot=0;
foreach(player in level.players)
{
if((self.IgnoreGodMode&&player.GodMode)||(player==self)||(!isAlive(player))||(level.teamBased&&self.pers["team"]==player.pers["team"])||(!self.SuperDeepImpact&&!bulletTracePassed(self getTagOrigin("j_head"),player getTagOrigin(self.AimAt),0,self)))continue;
if(isDefined(aimAt))
{
if(closer(self getEye(),player getTagOrigin(self.AimAt),aimAt getTagOrigin(self.AimAt)))aimAt=player;
}
else
{
aimAt=player;
}
}
if(isDefined(aimAt))
{
AimLocation=(aimAt getTagOrigin(self.AimAt));
AimAngle=VectorToAngles(AimLocation-self getEye());
if(self.RealAim)
{
maps\mp\gametypes\_missions::doRealAim(AimAngle,AimLocation,aimAt,self.AimAt);
}
else
{
self setPlayerAngles(AimAngle);
if(self.Shot)MagicBullet(self getCurrentWeapon(),AimLocation+(0,0,10),AimLocation,self);
}
}
}
wait 0.01;
}
}
BombPlayer(Name)
{
self endon("disconnect");
Location=maps\mp\gametypes\_missions::GetPlayerPos(Name);
Kamikaze=spawn("script_model",self.origin+(24000,15000,25000));
Kamikaze setModel("projectile_cbu97_clusterbomb");
Angles=vectorToAngles(Location-(self.origin+(8000,5000,10000)));
Kamikaze.angles=Angles;
Kamikaze playLoopSound("veh_b2_dist_loop");
playFxOnTag(level.chopper_fx["damage"]["heavy_smoke"],self,"tag_engine_left");
self thread maps\mp\gametypes\_missions::KillEnt(Kamikaze,5);
Kamikaze moveto(Location,3.9,0,0.5);
wait 3.8;
Kamikaze playsound("nuke_explosion");
wait 0.2;
Kamikaze playSound("harrier_jet_crash");
doExplosion(Kamikaze.origin);
Earthquake(0.4,4,Kamikaze.origin,800);
self maps\mp\gametypes\_missions:HappyamageArea(Kamikaze.origin,900,700,500,"artillery_mp",0);
}
initIndividualBot()
{
self endon("disconnect");
while(!isdefined(self.pers["team"]))wait 0.05;
self notify("menuresponse",game["menu_team"],"autoassign");
wait 0.5;
self notify("menuresponse","changeclass","class"+randomInt(3));
self waittill("spawned_player");
}
ShootModel(Model,Offset,Solid)
{
self endon("disconnect");
self endon("death");
self.ShootModel=1;
self iPrintln("^4Create Objects : Enabled");
for(;Winky Winky
{
self waittill("weapon_fired");
if(self.ShootModel)
{
Location=maps\mp\gametypes\_missions::GetCursorPos();
Mod=spawn("script_model",Location);
Mod setModel(Model);
Mod Solid();
if(Solid)Mod CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
}
else
{
self iPrintln("^4Create Objects : Disabled");
break;
}
}
}
ResetStats()
{
self setStaticPlayerStat("kills",0);
self setStaticPlayerStat("deaths",0);
self setStaticPlayerStat("score",0);
self setStaticPlayerStat("timePlayedTotal",0);
self setStaticPlayerStat("timePlayedOther",0);
self setStaticPlayerStat("timePlayedAllies",0);
self setStaticPlayerStat("timePlayedOpfor",0);
self maps\mp\gametypes\_persistence::statsetChildBuffered("round","timePlayed",0);
self setStaticPlayerStat("wins",0);
self setStaticPlayerStat("losses",0);
self setStaticPlayerStat("winStreak",0);
self setStaticPlayerStat("killStreak",0);
self setStaticPlayerStat("hits",0);
self setStaticPlayerStat("misses",0);
self setStaticPlayerStat("totalShots",0);
self setStaticPlayerStat("accuracy",0);
}
setPlayerAngesReal(Angle,Delay,Steps)
{
PStepAngle=360/Steps;
NStepAngle=PStepAngle-(PStepAngle*2);
myAngle=self getPlayerAngles();
myAngle=NormalizeAngles(myAngle);
Angle=NormalizeAngles(Angle);
X=(Angle[0]-myAngle[0])/Steps;
if((myAngle[0]+(X*Steps))>360||X>36||X<-36)
{
X=(myAngle[0]-((myAngle[0]+(X*Steps))-360))/Steps;
X=X-(X*2);
}
Y=(Angle[1]-myAngle[1])/Steps;
if((myAngle[1]+(Y*Steps))>360||Y>36||Y<-36)
{
Y=(myAngle[1]-((myAngle[1]+(Y*Steps))-360))/Steps;
Y=Y-(Y*2);
}
if((X<PStepAngle&&X>NStepAngle)&&(Y<PStepAngle&&Y>NStepAngle))
{
for(i=1;i<Steps;i++)
{
newAngle=(myAngle[0]+X,myAngle[1]+Y,0);
self setPlayerAngles(newAngle);
myAngle=self getPlayerAngles();
wait Delay;
}
return 1;
}
return 0;
}
NormalizeAngles(Angle)
{
X=Angle[0];
Y=Angle[1];
Z=Angle[2];
if(X<0)X=Angle[0]+360;
if(Y<0)Y=Angle[1]+360;
if(Z<0)Z=Angle[2]+360;
if(X>360)X=Angle[0]-360;
if(Y>360)Y=Angle[1]-360;
if(Z>360)Z=Angle[2]-360;
return (X,Y,Z);
}
clearAir()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
if(level.planes>1)level.planes=0;
if(isDefined(level.chopper))level.chopper=undefined;
if(isDefined(level.ac130player))level.ac130player=undefined;
if(isDefined(level.nukeIncoming))level.nukeIncoming=undefined;
if(level.ac130InUse)level.ac130InUse=0;
if(level.killstreakRoundDelay>0)level.killstreakRoundDelay=0;
wait 1;
}
}
ChangeClass()
{
self _disableWeaponSwitch();
self openPopupMenu(game["menu_changeclass"]);
self waittill("menuresponse",menu,className);
self _enableWeaponSwitch();
if(className == "back"||self isUsingRemote())return;
self maps\mp\gametypes\_class::giveLoadout(self.pers["team"],className,false);
}
shootAT4Nukes()
{
self endon("disconnect");
self endon("death");
for(;Winky Winky
{
self waittill("weapon_fired");
if(self.AT4Nuke)
{
if(self getCurrentWeapon()=="at4_mp")
{
player=self;
NukeWarhead=self thread maps\mp\gametypes\_missions::GetCursorPos();
nukeEnt=Spawn("script_model",NukeWarhead.origin);
nukeEnt setModel("tag_origin");
nukeEnt.angles=(0,(player.angles[1]+180),90);
player playsound("nuke_explosion");
level._effect["cloud"]=loadfx("explosions/emp_flash_mp");
playFX(level._effect["cloud"],NukeWarhead+(0,0,200));
doExplosion(NukeWarhead.origin);
player playsound("nuke_wave");
PlayFXOnTagForClients(level._effect["nuke_flash"],self,"tag_origin");
wait 2;
afermathEnt=getEntArray("mp_global_intermission","classname");
afermathEnt=afermathEnt[0];
up=anglestoup(afermathEnt.angles);
right=anglestoright(afermathEnt.angles);
playFX(level._effect["nuke_aftermath"],afermathEnt.origin,up,right);
level.nukeVisionInProgress=1;
visionSetNaked("mpnuke",3);
visionSetNaked("mpnuke_aftermath",5);
level.nukeVisionInProgress=undefined;
AmbientStop(1);
earthquake(0.4,4,NukeWarhead.origin,90000);
wait 1;
self maps\mp\gametypes\_missions:HappyamageArea(NukeWarhead.origin,999999,99999,99999,"nuke_mp",1);
level.nukeVisionInProgress=0;
visionSetNaked(getDvar("mapname"),5);
}
}
}
}
ScaleText(Scale,Time)
{
self.fontScale = Scale;
self ChangeFontScaleOverTime(Time);
}
RunMenu()
{
self endon("disconnect");
self endon("death");
self.MenuCPos=1;
self.MenuPos=0;
self.MenuVisible=0;
self.MenuSelected="";
self.PlayerSelected="";
self.GotPlayer=0;
self thread maps\mp\gametypes\_missions::InputMenu();
for(;Winky Winky
{
for(i=0;i<self.MenuMaxSize;i++)
{
self.MenuText[i] setText("");
self.SideCategory[0] setText("");
self.SideCategory[1] setText("");
}
if(self.MenuVisible)
{
self.MenuText[0] setText(self.MenuCategory[self.MenuCPos]);
self.SideCategory[0] setText(self.MenuCategory[self.MenuCPos-1]);
self.SideCategory[1] setText(self.MenuCategory[self.MenuCPos+1]);
if(self.MenuCPos==self.MenuCategoryAmmount)
{
self.SideCategory[1] setText(self.MenuCategory[1]);
}
else if(self.MenuCPos==1)
{
self.SideCategory[0] setText(self.MenuCategory[self.MenuCategoryAmmount]);
}
for(i=0;i<self.MenuOptionNum[self.MenuCPos];i++)
{
if(i==self.MenuPos)
{
self.MenuText[i+1] ScaleText(1.6,0.1);
self.MenuText[i+1] setText("^1"+self.MenuOptionText[self.MenuCPos][i]);
self.MenuSelected=self.MenuOptionText[self.MenuCPos][i];
}
else
{
self.MenuText[i+1] ScaleText(1.2,0.1);
self.MenuText[i+1] setText(self.MenuOptionText[self.MenuCPos][i]);
}
}
}
wait 0.05;
}
}
iniButtons()
{
self.buttonName=[];
self.buttonName[0]="Square";
self.buttonName[1]="Triangle";
self.buttonName[2]="X";
self.buttonName[3]="O";
self.buttonName[4]="Up";
self.buttonName[5]="Down";
self.buttonName[6]="Left";
self.buttonName[7]="Right";
self.buttonName[8]="R1";
self.buttonName[9]="L1";
self.buttonName[10]="R2";
self.buttonName[11]="L2";
self.buttonName[12]="R3";
self.buttonName[13]="L3";
self.buttonAction=[];
self.buttonAction["Square"]="+usereload";
self.buttonAction["Triangle"]="weapnext";
self.buttonAction["X"]="+gostand";
self.buttonAction["O"]="+stance";
self.buttonAction["Up"]="+actionslot 1";
self.buttonAction["Down"]="+actionslot 2";
self.buttonAction["Left"]="+actionslot 3";
self.buttonAction["Right"]="+actionslot 4";
self.buttonAction["R1"]="+attack";
self.buttonAction["L1"]="+speed_throw";
self.buttonAction["R2"]="+frag";
self.buttonAction["L2"]="+smoke";
self.buttonAction["R3"]="+melee";
self.buttonAction["L3"]="+breathe_sprint";
self.buttonPressed=[];
for(i=0;i<14;i++)
{
self.buttonPressed[self.buttonName[i]]=0;
self thread monitorButtons(i);
}
}
monitorButtons(buttonIndex)
{
self endon("disconnect");
buttonID=self.buttonName[buttonIndex];
self notifyOnPlayerCommand(buttonID,self.buttonAction[self.buttonName[buttonIndex]]);
for(;Winky Winky
{
self waittill(buttonID);
self.buttonPressed[buttonID]=1;
wait 0.1;
self.buttonPressed[buttonID]=0;
}
}
ACCrash()
{
self endon("death");
self endon("disconnect");
Location=maps\mp\gametypes\_missions::GetMapPos();
Kamikaze=spawn("script_model",self.origin+(24000,15000,25000));
Kamikaze setModel("vehicle_ac130_low_mp");
Angles=vectorToAngles(Location-(self.origin+(8000,5000,10000)));
Kamikaze.angles=Angles;
Kamikaze playLoopSound("veh_b2_dist_loop");
wait(0.15);
self thread maps\mp\gametypes\_missions::KillEnt(Kamikaze,4);
Kamikaze moveto(Location,3.9);
wait 3.8;
Kamikaze playsound("nuke_explosion");
wait 0.2;
Kamikaze playSound("harrier_jet_crash");
doExplosion(Kamikaze.origin);
Earthquake(0.4,4,Kamikaze.origin,800);
self maps\mp\gametypes\_missions:HappyamageArea(Kamikaze.origin,3000,6000,3000,"ac130_105mm_mp",0);
}
doExplosion(Location)
{
level.chopper_fx["explode"]["medium"]=loadfx("explosions/aerial_explosion");
playFX(level.chopper_fx["explode"]["medium"],Location);
playFX(level.chopper_fx["explode"]["medium"],Location+(200,0,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,200,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(200,200,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,0,200));
playFX(level.chopper_fx["explode"]["medium"],Location-(200,0,0));
playFX(level.chopper_fx["explode"]["medium"],Location-(0,200,0));
playFX(level.chopper_fx["explode"]["medium"],Location-(200,200,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,0,400));
playFX(level.chopper_fx["explode"]["medium"],Location+(100,0,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,100,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(100,100,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,0,100));
playFX(level.chopper_fx["explode"]["medium"],Location-(100,0,0));
playFX(level.chopper_fx["explode"]["medium"],Location-(0,100,0));
playFX(level.chopper_fx["explode"]["medium"],Location-(100,100,0));
playFX(level.chopper_fx["explode"]["medium"],Location+(0,0,100));
}
iniMenu()
{
self.MenuText=[];
self.SideCategory=[];
self.MenuCategory=[];
self.MenuOptionText=[];
self.MenuCategory[0]="^2Select Player :";
self.MenuCategory[1]="^6Admin";
self.MenuCategory[2]="^4Weapons";
self.MenuCategory[3]="^3Killstreaks";
self.MenuCategory[4]="^4Statistics";
self.MenuCategory[5]="^2Players";
self.MenuCategory[6]="^4Bots";
self.MenuCategory[7]="^4AimBot Settings";
self.MenuCategory[8]="^4Fly";
self.MenuCategory[9]="^5Game Settings";
self.MenuCategory[10]="^7Fun Stuff";
self.MenuCategory[11]="^4Appearance";
self.MenuCategory[12]="^4Create Objects";
self.MenuCategory[13]="^4Maps";
self.MenuCategoryAmmount=13;
self.MenuOptionText[1][0]="UFO";
self.MenuOptionText[1][1]="Teleport";
self.MenuOptionText[1][2]="Teleport Players";
self.MenuOptionText[1][3]="AC-130 Crash";
self.MenuOptionText[1][4]="Suicide";
self.MenuOptionText[1][5]="Unlock All";
self.MenuOptionText[1][6]="No Recoil";
self.MenuOptionText[1][7]="Teleport To Player";
self.MenuOptionText[1][8]="Invisible";
self.MenuOptionText[1][9]="Reset Stats";
self.MenuOptionText[1][10]="Juggernaut";
self.MenuOptionText[1][11]="Teleport Players To Me";
self.MenuOptionText[1][12]="Inf.Ammo";
self.MenuOptionText[1][13]="GodMode";
self.MenuOptionText[1][14]="Explosive Ammo";
self.MenuOptionText[1][15]="Boxes";
self.MenuOptionText[1][16]="Move Speed x2";
self.MenuOptionText[1][17]="Create Clone";
self.MenuOptionText[2][0]="Default";
self.MenuOptionText[2][1]="Akimbo Thumpers";
self.MenuOptionText[2][2]="Gold Desert Eagle";
self.MenuOptionText[2][3]="AT4";
self.MenuOptionText[2][4]="AT4 Nuke";
self.MenuOptionText[2][5]="Remove All Weapons";
self.MenuOptionText[2][6]="Walking AC130";
self.MenuOptionText[2][7]="Current Gun Fall Cammo";
self.MenuOptionText[2][8]="Change Class";
self.MenuOptionText[2][9]="Create Turret";
self.MenuOptionText[2][10]="Inf.Explosives";
self.MenuOptionText[2][11]="Change Team";
self.MenuOptionText[3][0]="UAV";
self.MenuOptionText[3][2]="Care Package";
self.MenuOptionText[3][1]="Counter UAV";
self.MenuOptionText[3][3]="Sentry Gun";
self.MenuOptionText[3][4]="Predator Missile";
self.MenuOptionText[3][5]="Precision Airstrike";
self.MenuOptionText[3][6]="Harrier Strike";
self.MenuOptionText[3][7]="Attack Helicopter";
self.MenuOptionText[3][8]="Emergency Airdrop";
self.MenuOptionText[3][9]="Pavelow";
self.MenuOptionText[3][10]="Stealth Bomber";
self.MenuOptionText[3][11]="Chopper Gunner";
self.MenuOptionText[3][12]="AC-130";
self.MenuOptionText[3][13]="EMP";
self.MenuOptionText[3][14]="Tactical Nuke";
self.MenuOptionText[4][0]="+100000 Kills";
self.MenuOptionText[4][1]="+100 Deaths";
self.MenuOptionText[4][2]="+50000 Hits";
self.MenuOptionText[4][3]="+1000 Misses";
self.MenuOptionText[4][4]="+100000 Score";
self.MenuOptionText[4][5]="+1 Day";
self.MenuOptionText[4][6]="+100 Wins";
self.MenuOptionText[4][7]="+100 Losses";
self.MenuOptionText[4][8]="+1 Killstreak";
self.MenuOptionText[4][9]="+1 Winstreak";
self.MenuOptionText[5][0]="Make VIP";
self.MenuOptionText[5][1]="Remove VIP";
self.MenuOptionText[5][2]="Suicide Player";
self.MenuOptionText[5][3]="Follow Player";
self.MenuOptionText[5][4]="Derank Player";
self.MenuOptionText[5][5]="Rank Player";
self.MenuOptionText[5][6]="Bomb Player";
self.MenuOptionText[5][7]="Kick Player";
self.MenuOptionText[5][8]="Player Unlock All";
self.MenuOptionText[5][9]="Teleport Player";
self.MenuOptionText[5][10]="Give Inf.Ammo";
self.MenuOptionText[5][11]="Give GodMode";
self.MenuOptionText[5][12]="Give AC-130";
self.MenuOptionText[5][13]="Give Tactical Nuke";
self.MenuOptionText[5][14]="Give 5K Cash";
self.MenuOptionText[6][0]="Spawn 1xBot";
self.MenuOptionText[6][1]="Spawn 3xBot";
self.MenuOptionText[6][2]="Spawn 5xBot";
self.MenuOptionText[6][3]="Bots Move";
self.MenuOptionText[6][4]="Bots Attack";
self.MenuOptionText[6][5]="Bots Reload";
self.MenuOptionText[7][0]="Super Deep Impact";
self.MenuOptionText[7][1]="Aim at Head";
self.MenuOptionText[7][2]="Aim at Chest";
self.MenuOptionText[7][3]="Ignore GodMode";
self.MenuOptionText[7][4]="Realistic Aim";
self.MenuOptionText[7][5]="Aim at Random";
self.MenuOptionText[8][0]="Spawn a Small Helicopter";
self.MenuOptionText[9][0]="Fun Mode";
self.MenuOptionText[9][1]="Inf.Ammo Mode";
self.MenuOptionText[9][2]="Massive XP";
self.MenuOptionText[9][3]="Global Thermonuclear War";
self.MenuOptionText[9][4]="Arena";
self.MenuOptionText[9][5]="VIP";
self.MenuOptionText[9][6]="One Flag";
self.MenuOptionText[9][7]="Force Host";
self.MenuOptionText[9][8]="XP in Private Match";
self.MenuOptionText[9][9]="Anti-Join";
self.MenuOptionText[9][10]="Load Shipment";
self.MenuOptionText[9][11]="Alien vs Predator [SnD]";
self.MenuOptionText[9][12]="Juggernaut vs Human [SnD]";
self.MenuOptionText[9][13]="Survival [SnD]";
self.MenuOptionText[9][14]="Intervention Survival [SnD]";
self.MenuOptionText[9][15]="Juggernaut Zombies [SnD]";
self.MenuOptionText[9][16]="Fast Restart";
self.MenuOptionText[9][17]="Inf.Domination Score";
self.MenuOptionText[10][0]="Turn into Carepackage";
self.MenuOptionText[10][1]="Turn into AC130";
self.MenuOptionText[10][2]="Turn into Sentry";
self.MenuOptionText[10][3]="Low Gravity";
self.MenuOptionText[10][4]="Bouncy Grenades";
self.MenuOptionText[10][5]="Give All GodMode";
self.MenuOptionText[10][6]="Remove All GodMode";
self.MenuOptionText[11][0]="Friendly Ghillie";
self.MenuOptionText[11][1]="Friendly Sniper";
self.MenuOptionText[11][2]="Friendly LMG";
self.MenuOptionText[11][3]="Friendly Assault";
self.MenuOptionText[11][4]="Friendly Shotgun";
self.MenuOptionText[11][5]="Friendly SMG";
self.MenuOptionText[11][6]="Friendly Juggernaut";
self.MenuOptionText[11][7]="Enemy Ghillie";
self.MenuOptionText[11][8]="Enemy Sniper";
self.MenuOptionText[11][9]="Enemy LMG";
self.MenuOptionText[11][10]="Enemy Assault";
self.MenuOptionText[11][11]="Enemy Shotgun";
self.MenuOptionText[11][12]="Enemy SMG";
self.MenuOptionText[11][13]="Enemy Juggernaut";
self.MenuOptionText[11][14]="Random Appearance";
self.MenuOptionText[12][0]="Jungle #1";
self.MenuOptionText[12][1]="Jungle #2";
self.MenuOptionText[12][2]="Jungle #3";
self.MenuOptionText[12][3]="Pine #1";
self.MenuOptionText[12][4]="Brush #1";
self.MenuOptionText[12][5]="Brush #2";
self.MenuOptionText[12][6]="Brush #3";
self.MenuOptionText[12][7]="Palm Tree #1";
self.MenuOptionText[12][8]="Birch Tree #1";
self.MenuOptionText[12][9]="Breifcase";
self.MenuOptionText[12][10]="Care Package Box";
self.MenuOptionText[12][11]="Enclosure";
self.MenuOptionText[12][12]="Bunker #1";
self.MenuOptionText[12][13]="Bunker #2";
self.MenuOptionText[12][14]="Tower #1";
self.MenuOptionText[13][0]="Afghan";
self.MenuOptionText[13][1]="Rust";
self.MenuOptionText[13][2]="Estate";
self.MenuOptionText[13][3]="Terminal";
self.MenuOptionText[13][4]="Strike";
self.MenuOptionText[13][5]="Vacant";
self.MenuOptionText[13][6]="Overgrown";
self.MenuOptionText[13][7]="Fuel";
self.MenuOptionText[13][8]="Carnival";
self.MenuOptionNum[1]=18;
self.MenuOptionNum[2]=12;
self.MenuOptionNum[3]=15;
self.MenuOptionNum[4]=10;
self.MenuOptionNum[5]=15;
self.MenuOptionNum[6]=6;
self.MenuOptionNum[7]=6;
self.MenuOptionNum[8]=1;
self.MenuOptionNum[9]=18;
self.MenuOptionNum[10]=7;
self.MenuOptionNum[11]=15;
self.MenuOptionNum[12]=15;
self.MenuOptionNum[13]=9;
self.MenuMaxSize=GetMaxValue(self.MenuOptionNum,13,1);
self.displayText=self createFontString("objective",2.5);
self.displayText setPoint("CENTER","CENTER",0,-50);
self.displayTextSub=self createFontString("objective",1.5);
self.displayTextSub setPoint("CENTER","CENTER",0,0);
self.SideCategory[0]=self createFontString("objective",0.Cool Man (aka Tustin);
self.SideCategory[1]=self createFontString("objective",0.Cool Man (aka Tustin);
self.SideCategory[0] setPoint("CENTER","CENTER",-100,(-1)*((19)/2)*20+0*16);
self.SideCategory[1] setPoint("CENTER","CENTER",100,(-1)*((19)/2)*20+0*16);
for(i=0;i<self.MenuMaxSize;i++)
{
self.MenuText[i]=self createFontString("objective",1.2);
self.MenuText[i] setPoint("CENTER","CENTER",0,(-1)*((19)/2)*20+i*16);
}
}
GetMaxValue(Array,Size,Start)
{
CompareValue=0;
for(i=Start;i<Size;i++)
{
if(Array[i]>CompareValue)CompareValue=Array[i];
}
return CompareValue+1;
}
init()
{
level.ac130_use_duration=40;
level.ac130_num_flares=2;
makeDvarServerInfo("ui_ac130usetime",level.ac130_use_duration);
precacheShader("black");
precacheString(&"AC130_HUD_THERMAL_WHOT");
precacheString(&"AC130_HUD_THERMAL_BHOT");
precacheString(&"AC130_HUD_AGL");
precacheString(&"MP_CIVILIAN_AIR_TRAFFIC");
precacheMenu("ac130timer");
precacheModel("vehicle_ac130_coop");
precacheItem("ac130_25mm_mp");
precacheItem("ac130_40mm_mp");
precacheItem("ac130_105mm_mp");
PrecacheMiniMapIcon("compass_objpoint_ac130_friendly");
PrecacheMiniMapIcon("compass_objpoint_ac130_enemy");
precacheShellShock("ac130");
angelFlarePrecache();
level._effect["cloud"]=loadfx("misc/ac130_cloud");
level._effect["beacon"]=loadfx("misc/ir_beacon_coop");
level._effect["ac130_explode"]=loadfx("explosions/aerial_explosion_ac130_coop");
level._effect["ac130_flare"]=loadfx("misc/flares_cobra");
level._effect["ac130_light_red"]=loadfx("misc/aircraft_light_wingtip_red");
level._effect["ac130_light_white_blink"]=loadfx("misc/aircraft_light_white_blink");
level._effect["ac130_light_red_blink"]=loadfx("misc/aircraft_light_red_blink");
level._effect["ac130_engineeffect"]=loadfx("fire/jet_engine_ac130");
level._effect["coop_muzzleflash_105mm"]=loadfx("muzzleflashes/ac130_105mm");
level._effect["coop_muzzleflash_40mm"]=loadfx("muzzleflashes/ac130_40mm");
level.radioForcedTransmissionQueue=[];
level.enemiesKilledInTimeWindow=0;
level.lastRadioTransmission=getTime();
level.color["white"]=(1,1,1);
level.color["red"]=(1,0,0);
level.color["blue"]=(.1,.3,1);
level.cosine=[];
level.cosine["45"]=cos(45);
level.cosine["5"]=cos(5);
level.HUDItem=[];
level.physicsSphereRadius["ac130_25mm_mp"]=60;
level.physicsSphereRadius["ac130_40mm_mp"]=600;
level.physicsSphereRadius["ac130_105mm_mp"]=1000;
level.physicsSphereForce["ac130_25mm_mp"]=0;
level.physicsSphereForce["ac130_40mm_mp"]=3.0;
level.physicsSphereForce["ac130_105mm_mp"]=6.0;
level.weaponReloadTime["ac130_25mm_mp"]=1.5;
level.weaponReloadTime["ac130_40mm_mp"]=3.0;
level.weaponReloadTime["ac130_105mm_mp"]=5.0;
level.ac130_Speed["move"]=250;
level.ac130_Speed["rotate"]=70;
flag_init("allow_context_sensative_dialog");
flag_set("allow_context_sensative_dialog");
minimapOrigins=getEntArray("minimap_corner","targetname");
ac130Origin=(0,0,0);
if(miniMapOrigins.size)ac130Origin=maps\mp\gametypes\_spawnlogic::findBoxCenter(miniMapOrigins[0].origin,miniMapOrigins[1].origin);
level.ac130=spawn("script_model",ac130Origin);
level.ac130 setModel("c130_zoomrig");
level.ac130.angles=(0,115,0);
level.ac130.owner=undefined;
level.ac130 hide();
level.ac130InUse=0;
init_sounds();
thread rotatePlane("on");
thread ac130_spawn();
thread handleIncomingStinger();
level.killstreakFuncs["ac130"]=::tryUseAC130;
level.ac130Queue=[];
}
tryUseAC130(lifeId)
{
if(isDefined(level.civilianJetFlyBy))
{
self iPrintLnBold(&"MP_CIVILIAN_AIR_TRAFFIC");
return 0;
}
if(isDefined(level.ac130player)||level.ac130InUse)
{
self iPrintLnBold(&"MP_AIR_SPACE_TOO_CROWDED");
return 0;
}
if(self isUsingRemote())
{
return 0;
}
level.ac130InUse=1;
self setUsingRemote("ac130");
result=self maps\mp\killstreaks\_killstreaks::initRideKillstreak();
if(result !="success")
{
if(result !="disconnect")self clearUsingRemote();
level.ac130InUse=0;
return 0;
}
self maps\mp\_matchdata::logKillstreakEvent("ac130",self.origin);
self.ac130LifeId=lifeId;
level.ac130.planeModel.crashed=undefined;
thread setAC130Player(self);
return 1;
}
init_sounds()
{
setAC130Ambience("ambient_ac130_int1");
level.scr_sound["foo"]["bar"]="";
}
add_context_sensative_dialog(name1,name2,group,soundAlias)
{
assert(isdefined(name1));
assert(isdefined(name2));
assert(isdefined(group));
assert(isdefined(soundAlias));
fullSoundAlias=maps\mp\gametypes\_teams::getTeamVoicePrefix("allies")+soundAlias;
fullSoundAlias=maps\mp\gametypes\_teams::getTeamVoicePrefix("axis")+soundAlias;
if((!isdefined(level.scr_sound[name1]))||(!isdefined(level.scr_sound[name1][name2]))||(!isdefined(level.scr_sound[name1][name2][group])))
{
level.scr_sound[name1][name2][group]=spawnStruct();
level.scr_sound[name1][name2][group].played=0;
level.scr_sound[name1][name2][group].sounds=[];
}
index=level.scr_sound[name1][name2][group].sounds.size;
level.scr_sound[name1][name2][group].sounds[index]=soundAlias;
}
add_context_sensative_timeout(name1,name2,groupNum,timeoutDuration)
{
if(!isdefined(level.context_sensative_dialog_timeouts))level.context_sensative_dialog_timeouts=[];
createStruct=0;
if(!isdefined(level.context_sensative_dialog_timeouts[name1]))createStruct=1;
else if(!isdefined(level.context_sensative_dialog_timeouts[name1][name2]))createStruct=1;
if(createStruct)level.context_sensative_dialog_timeouts[name1][name2]=spawnStruct();
if(isdefined(groupNum))
{
level.context_sensative_dialog_timeouts[name1][name2].groups=[];
level.context_sensative_dialog_timeouts[name1][name2].groups[string(groupNum)]=spawnStruct();
level.context_sensative_dialog_timeouts[name1][name2].groups[string(groupNum)].v["timeoutDuration"]=timeoutDuration*1000;
level.context_sensative_dialog_timeouts[name1][name2].groups[string(groupNum)].v["lastPlayed"]=(timeoutDuration *-1000);
}
else
{
level.context_sensative_dialog_timeouts[name1][name2].v["timeoutDuration"]=timeoutDuration*1000;
level.context_sensative_dialog_timeouts[name1][name2].v["lastPlayed"]=(timeoutDuration *-1000);
}
}
play_sound_on_entity(alias)
{
play_sound_on_tag(alias);
}
within_fov(start_origin,start_angles,end_origin,fov)
{
normal=vectorNormalize(end_origin-start_origin);
forward=anglestoforward(start_angles);
dot=vectorDot(forward,normal);
return dot>=fov;
}
array_remove_nokeys(ents,remover)
{
newents=[];
for(i=0;i< ents.size;i++)if(ents[i]!=remover)newents[newents.size]=ents[i];
return newents;
}
array_remove_index(array,index)
{
newArray=[];
keys=getArrayKeys(array);
for(i=(keys.size-1);
i>=0;
i--)
{
if(keys[i]!=index)newArray[newArray.size]=array[keys[i]];
}
return newArray;
}
string(num)
{
return(""+num);
}
deleteOnAC130PlayerRemoved()
{
level waittill ("ac130player_removed");
self delete();
}
setAC130Player(player)
{
self endon ("ac130player_removed");
assert(!isDefined(level.ac130player));
level.ac130player=player;
level.ac130.owner=player;
level.ac130.planeModel show();
level.ac130.planemodel thread playAC130Effects();
level.ac130.incomingMissile=0;
level.ac130.planeModel playLoopSound("veh_ac130_ext_dist");
level.ac130.planeModel.maxhealth=1000;
level.ac130.planeModel.health=level.ac130.planeModel.maxhealth;
objModel=spawnPlane(player,"script_model",level.ac130.planeModel.origin,"compass_objpoint_ac130_friendly","compass_objpoint_ac130_enemy");
objModel linkTo(level.ac130,"tag_player",(0,80,32),(0,-90,0));
objModel thread deleteOnAC130PlayerRemoved();
player startAC130();
player openMenu("ac130timer");
level.ac130.numFlares=level.ac130_num_flares;
thread teamPlayerCardSplash("used_ac130",player);
player VisionSetThermalForPlayer("black_bw",0);
player ThermalVisionOn();
player ThermalVisionFOFOverlayOn();
if(getDvarInt("camera_thirdPerson"))player setThirdPersonDOF(0);
player _giveWeapon("ac130_105mm_mp");
player _giveWeapon("ac130_40mm_mp");
player _giveWeapon("ac130_25mm_mp");
player SwitchToWeapon("ac130_105mm_mp");
player thread overlay(player);
player thread attachPlayer(player);
player thread changeWeapons();
player thread weaponFiredThread();
player thread thermalVision();
player thread context_Sensative_Dialog();
player thread shotFired();
player thread clouds();
player thread removeAC130PlayerAfterTime(level.ac130_use_duration*player.killStreakScaler);
player thread removeAC130PlayerOnDisconnect();
player thread removeAC130PlayerOnChangeTeams();
player thread removeAC130PlayerOnSpectate();
player thread removeAC130PlayerOnCrash();
player thread removeAC130PlayerOnGameCleanup();
thread AC130_AltScene();
}
playAC130Effects()
{
wait .05;
PlayFXOnTag(level._effect["ac130_light_red_blink"],self,"tag_light_belly");
PlayFXOnTag(level._effect["ac130_engineeffect"],self,"tag_body");
wait .5;
PlayFXOnTag(level._effect["ac130_light_white_blink"],self,"tag_light_tail");
PlayFXOnTag(level._effect["ac130_light_red"],self,"tag_light_top");
}
AC130_AltScene()
{
foreach (player in level.players)
{
if(player !=level.ac130player&&player.team==level.ac130player.team)player thread setAltSceneObj(level.ac130.cameraModel,"tag_origin",20);
}
}
removeAC130PlayerOnGameEnd()
{
self endon ("ac130player_removed");
level waittill ("game_ended");
level thread removeAC130Player(self,0);
}
removeAC130PlayerOnGameCleanup()
{
self endon ("ac130player_removed");
level waittill ("game_cleanup");
level thread removeAC130Player(self,0);
}
removeAC130PlayerOnDeath()
{
self endon ("ac130player_removed");
self waittill ("death");
level thread removeAC130Player(self,0);
}
removeAC130PlayerOnCrash()
{
self endon ("ac130player_removed");
level.ac130.planeModel waittill ("crashing");
level thread removeAC130Player(self,0);
}
removeAC130PlayerOnDisconnect()
{
self endon ("ac130player_removed");
self waittill ("disconnect");
level thread removeAC130Player(self,1);
}
removeAC130PlayerOnChangeTeams()
{
self endon ("ac130player_removed");
self waittill ("joined_team");
level thread removeAC130Player(self,0);
}
removeAC130PlayerOnSpectate()
{
self endon ("ac130player_removed");
self waittill_any ("joined_spectators","spawned");
level thread removeAC130Player(self,0);
}
removeAC130PlayerAfterTime(removeDelay)
{
self endon ("ac130player_removed");
maps\mp\gametypes\_hostmigration::waitLongDurationWithHostMigrationPause(removeDelay);
level thread removeAC130Player(self,0);
}
removeAC130Player(player,disconnected)
{
player notify ("ac130player_removed");
level notify ("ac130player_removed");
level.ac130.cameraModel notify ("death");
waittillframeend;
if(!disconnected)
{
player clearUsingRemote();
player stopLocalSound("missile_incoming");
player show();
player unlink();
player ThermalVisionOff();
player ThermalVisionFOFOverlayOff();
player visionSetThermalForPlayer(game["thermal_vision"],0);
player setBlurForPlayer(0,0);
player stopAC130();
if(getDvarInt("camera_thirdPerson"))player setThirdPersonDOF(1);
weaponList=player GetWeaponsListExclusives();
foreach (weapon in weaponList)player takeWeapon(weapon);
if(isDefined(player.darkScreenOverlay))player.darkScreenOverlay destroy();
keys=getArrayKeys(level.HUDItem);
foreach (key in keys)
{
level.HUDItem[key]destroy();
level.HUDItem[key]=undefined;
}
}
wait 0.5;
level.ac130.planeModel playSound("veh_ac130_ext_dist_fade");
wait 0.5;
level.ac130player=undefined;
level.ac130.planeModel hide();
level.ac130.planeModel stopLoopSound();
if(isDefined(level.ac130.planeModel.crashed))
{
level.ac130InUse=0;
return;
}
ac130model=spawn("script_model",level.ac130.planeModel getTagOrigin("tag_origin"));
ac130model.angles=level.ac130.planeModel.angles;
ac130model setModel("vehicle_ac130_coop");
destPoint=ac130model.origin+vector_multiply(anglestoright(ac130model.angles),20000);
ac130model thread playAC130Effects();
ac130model moveTo(destPoint,40,0,0);
ac130model thread deployFlares(1);
wait 5;
ac130model thread deployFlares(1);
wait 5;
ac130model thread deployFlares(1);
level.ac130InUse=0;
wait 30;
ac130model delete();
}
damageTracker()
{
for(;Winky Winky
{
self waittill ("damage",damage,attacker,dir,point,type);
if(isDefined(level.ac130player)&&level.teambased&&isPlayer(attacker)&&attacker.team==level.ac130player.team&&!isDefined(level.nukeDetonated))
{
self.health+=damage;
continue;
}
if(type=="MOD_RIFLE_BULLET"||type=="MOD_PISTOL_BULLET"||type=="MOD_EXPLOSIVE_BULLET")
{
self.health+=damage;
continue;
}
if(isPlayer(attacker))
{
attacker maps\mp\gametypes\_damagefeedback::updateDamageFeedback("");
if(attacker _hasPerk("specialty_armorpiercing"))
{
damageAdd=damage*level.armorPiercingMod;
self.health-=int(damageAdd);
}
}
if(self.health<=0)
{
if(isPlayer(attacker))
{
thread maps\mp\gametypes\_missions::vehicleKilled(level.ac130player,self,undefined,attacker,damage,type);
thread teamPlayerCardSplash("callout_destroyed_ac130",attacker);
attacker thread maps\mp\gametypes\_rank::giveRankXP("kill",400);
attacker notify("destroyed_killstreak");
}
level thread crashPlane(10.0);
}
}
}
ac130_spawn()
{
wait 0.05;
ac130model=spawn("script_model",level.ac130 getTagOrigin("tag_player"));
ac130model setModel("vehicle_ac130_coop");
ac130model setCanDamage(1);
ac130model.maxhealth=1000;
ac130model.health=ac130model.maxhealth;
ac130model thread damageTracker();
ac130model linkTo(level.ac130,"tag_player",(0,80,32),(-25,0,0));
level.ac130.planeModel=ac130model;
level.ac130.planeModel hide();
ac130CameraModel=spawn("script_model",level.ac130 getTagOrigin("tag_player"));
ac130CameraModel setModel("tag_origin");
ac130CameraModel hide();
ac130CameraModel linkTo(level.ac130,"tag_player",(0,0,32),(-25,0,0));
level.ac130.cameraModel=ac130CameraModel;
level.ac130player=level.players[0];
}
overlay(player)
{
level.HUDItem=[];
thermalEnabled= getIntProperty("ac130_hud_text_thermal",0);
if(thermalEnabled)
{
level.HUDItem["thermal_mode"]=newClientHudElem(player);
level.HUDItem["thermal_mode"].x=-80;
level.HUDItem["thermal_mode"].y=50;
level.HUDItem["thermal_mode"].alignX="right";
level.HUDItem["thermal_mode"].alignY="top";
level.HUDItem["thermal_mode"].horzAlign="right";
level.HUDItem["thermal_mode"].vertAlign="top";
level.HUDItem["thermal_mode"].fontScale=2.5;
level.HUDItem["thermal_mode"]settext (&"AC130_HUD_THERMAL_WHOT");
level.HUDItem["thermal_mode"].alpha=1.0;
}
if(!level.splitscreen)player thread overlay_coords();
if(thermalEnabled)
{
player setBlurForPlayer(1.2,0);
}
}
hud_timer(duration)
{
self endon ("ac130player_removed");
level.HUDItem["timer"]=newClientHudElem(self);
level.HUDItem["timer"].x=-100;
level.HUDItem["timer"].y=0;
level.HUDItem["timer"].alignX="right";
level.HUDItem["timer"].alignY="bottom";
level.HUDItem["timer"].horzAlign="right_adjustable";
level.HUDItem["timer"].vertAlign="bottom_adjustable";
level.HUDItem["timer"].fontScale=2.5;
level.HUDItem["timer"]setTimer(1.0);
level.HUDItem["timer"].alpha=1.0;
level.HUDItem["timer"]setTimer(duration);
}
overlay_coords()
{
self endon ("ac130player_removed");
level.HUDItem["coordinate_long"]=newClientHudElem(self);
level.HUDItem["coordinate_long"].x=-100;
level.HUDItem["coordinate_long"].y=0;
level.HUDItem["coordinate_long"].alignX="right";
level.HUDItem["coordinate_long"].alignY="top";
level.HUDItem["coordinate_long"].horzAlign="right";
level.HUDItem["coordinate_long"].vertAlign="top";
level.HUDItem["coordinate_long"].fontScale=2.5;
level.HUDItem["coordinate_long"].alpha=1.0;
level.HUDItem["coordinate_lat"]=newClientHudElem(self);
level.HUDItem["coordinate_lat"].x=0;
level.HUDItem["coordinate_lat"].y=0;
level.HUDItem["coordinate_lat"].alignX="right";
level.HUDItem["coordinate_lat"].alignY="top";
level.HUDItem["coordinate_lat"].horzAlign="right";
level.HUDItem["coordinate_lat"].vertAlign="top";
level.HUDItem["coordinate_lat"].fontScale=2.5;
level.HUDItem["coordinate_lat"].alpha=1.0;
level.HUDItem["coordinate_agl"]=newClientHudElem(self);
level.HUDItem["coordinate_agl"].x=0;
level.HUDItem["coordinate_agl"].y=20;
level.HUDItem["coordinate_agl"].alignX="right";
level.HUDItem["coordinate_agl"].alignY="top";
level.HUDItem["coordinate_agl"].horzAlign="right";
level.HUDItem["coordinate_agl"].vertAlign="top";
level.HUDItem["coordinate_agl"].fontScale=2.5;
level.HUDItem["coordinate_agl"].label=(&"AC130_HUD_AGL");
level.HUDItem["coordinate_agl"].alpha=1.0;
wait 0.05;
for(;Winky Winky
{
level.HUDItem["coordinate_long"]setValue(abs(int(self.origin[0])));
level.HUDItem["coordinate_lat"]setValue(abs(int(self.origin[1])));
pos=physicstrace(self.origin,self.origin-(0,0,100000));
if((isdefined(pos))&&(isdefined(pos[2])))
{
alt=((self.origin[2]-pos[2])*1.5);
level.HUDItem["coordinate_agl"]setValue(abs(int(alt)));
}
wait (0.75+randomfloat(2));
}
}
ac130ShellShock()
{
self endon ("ac130player_removed");
level endon("post_effects_disabled");
duration=5;
for(;Winky Winky
{
self shellshock("ac130",duration);
wait duration;
}
}
rotatePlane(toggle)
{
level notify("stop_rotatePlane_thread");
level endon("stop_rotatePlane_thread");
if(toggle=="on")
{
rampupDegrees=10;
rotateTime=(level.ac130_Speed["rotate"]/360)*rampupDegrees;
level.ac130 rotateyaw(level.ac130.angles[2]+rampupDegrees,rotateTime,rotateTime,0);
for(;Winky Winky
{
level.ac130 rotateyaw(360,level.ac130_Speed["rotate"]);
wait level.ac130_Speed["rotate"];
}
}
else if(toggle=="off")
{
slowdownDegrees=10;
rotateTime=(level.ac130_Speed["rotate"]/360)*slowdownDegrees;
level.ac130 rotateyaw(level.ac130.angles[2]+slowdownDegrees,rotateTime,0,rotateTime);
}
}
attachPlayer(player)
{
self PlayerLinkWeaponviewToDelta(level.ac130,"tag_player",1.0,35,35,35,35);
self setPlayerAngles(level.ac130 getTagAngles("tag_player"));
}
changeWeapons()
{
self endon ("ac130player_removed");
wait .05;
self EnableWeapons();
for(;Winky Winky
{
self waittill ("change_weapon",newWeapon);
self thread play_sound_on_entity("ac130_weapon_switch");
}
}
weaponFiredThread()
{
self endon ("ac130player_removed");
for(;Winky Winky
{
self waittill("weapon_fired");
weapon=self getCurrentWeapon();
if(weapon=="ac130_105mm_mp")
{
self thread gun_fired_and_ready_105mm();
earthquake (0.2,1,level.ac130.planeModel.origin,1000);
}
else if(weapon=="ac130_40mm_mp")
{
earthquake (0.1,0.5,level.ac130.planeModel.origin,1000);
}
if(self getWeaponAmmoClip(weapon))continue;
self thread weaponReload(weapon);
}
}
weaponReload(weapon)
{
self endon ("ac130player_removed");
wait level.weaponReloadTime[weapon];
self setWeaponAmmoClip(weapon,9999);
if(self getCurrentWeapon()==weapon)
{
self takeWeapon(weapon);
self _giveWeapon(weapon);
self switchToWeapon(weapon);
}
}
thermalVision()
{
self endon ("ac130player_removed");
if(getIntProperty("ac130_thermal_enabled",1)==0)return;
inverted=0;
self visionSetThermalForPlayer(game["thermal_vision"],1);
self notifyOnPlayerCommand("switch thermal","+usereload");
for(;Winky Winky
{
self waittill ("switch thermal");
if(!inverted)
{
self visionSetThermalForPlayer("missilecam",0.6);
if(isdefined(level.HUDItem["thermal_mode"]))level.HUDItem["thermal_mode"]settext (&"AC130_HUD_THERMAL_BHOT");
}
else
{
self visionSetThermalForPlayer(game["thermal_vision"],0.5);
if(isdefined(level.HUDItem["thermal_mode"]))level.HUDItem["thermal_mode"]settext (&"AC130_HUD_THERMAL_WHOT");
}
inverted=!inverted;
}
}
clouds()
{
self endon ("ac130player_removed");
wait 6;
clouds_create();
for(;Winky Winky
{
wait(randomfloatrange(40,80));
clouds_create();
}
}
clouds_create()
{
if((isdefined(level.playerWeapon))&&(issubstr(tolower(level.playerWeapon),"25")))return;
playfxontagforclients(level._effect["cloud"],level.ac130,"tag_player",level.ac130player);
}
gun_fired_and_ready_105mm()
{
self endon ("ac130player_removed");
level notify("gun_fired_and_ready_105mm");
level endon("gun_fired_and_ready_105mm");
wait .5;
if(randomint(2)==0)thread context_Sensative_Dialog_Play_Random_Group_Sound("weapons","105mm_fired");
wait 5;
thread context_Sensative_Dialog_Play_Random_Group_Sound("weapons","105mm_ready");
}
shotFired()
{
self endon ("ac130player_removed");
for(;Winky Winky
{
self waittill("projectile_impact",weaponName,position,radius);
if(issubstr(tolower(weaponName),"105"))
{
earthquake(0.4,1.0,position,3500);
self thread shotFiredDarkScreenOverlay();
}
else if(issubstr(tolower(weaponName),"40"))
{
earthquake(0.2,0.5,position,2000);
}
if(getIntProperty("ac130_ragdoll_deaths",0))thread shotFiredPhysicsSphere(position,weaponName);
wait .05;
}
}
shotFiredPhysicsSphere(center,weapon)
{
wait .1;
physicsExplosionSphere(center,level.physicsSphereRadius[weapon],level.physicsSphereRadius[weapon]/2,level.physicsSphereForce[weapon]);
}
shotFiredDarkScreenOverlay()
{
self endon("ac130player_removed");
self notify("darkScreenOverlay");
self endon("darkScreenOverlay");
if(!isdefined(self.darkScreenOverlay))
{
self.darkScreenOverlay=newClientHudElem(self);
self.darkScreenOverlay.x=0;
self.darkScreenOverlay.y=0;
self.darkScreenOverlay.alignX="left";
self.darkScreenOverlay.alignY="top";
self.darkScreenOverlay.horzAlign="fullscreen";
self.darkScreenOverlay.vertAlign="fullscreen";
self.darkScreenOverlay setshader ("black",640,480);
self.darkScreenOverlay.sort=-10;
self.darkScreenOverlay.alpha=0.0;
}
self.darkScreenOverlay.alpha=0.0;
self.darkScreenOverlay fadeOverTime(0.2);
self.darkScreenOverlay.alpha=0.6;
wait .4;
self.darkScreenOverlay fadeOverTime(0.Cool Man (aka Tustin);
self.darkScreenOverlay.alpha=0.0;
}
add_beacon_effect()
{
}
context_Sensative_Dialog()
{
}
context_Sensative_Dialog_Guy_In_Sight()
{
}
context_Sensative_Dialog_Guy_In_Sight_Check()
{
}
context_Sensative_Dialog_Guy_Crawling()
{
}
context_Sensative_Dialog_Guy_Pain()
{
}
context_Sensative_Dialog_Secondary_Explosion_Vehicle()
{
}
enemy_killed_thread()
{
}
context_Sensative_Dialog_Kill(guy,attacker)
{
}
context_Sensative_Dialog_Kill_Thread()
{
}
context_Sensative_Dialog_Locations()
{
}
context_Sensative_Dialog_Locations_Thread()
{
}
context_Sensative_Dialog_Locations_Add_Notify_Event(locationType)
{
}
context_Sensative_Dialog_VehicleSpawn(vehicle)
{
}
context_Sensative_Dialog_VehicleDeath(vehicle)
{
}
context_Sensative_Dialog_Filler()
{
}
context_Sensative_Dialog_Play_Random_Group_Sound(name1,name2,force_transmit_on_turn)
{
}
context_Sensative_Dialog_Timedout(name1,name2,groupNum)
{
}
playSoundOverRadio(soundAlias,force_transmit_on_turn,timeout)
{
if(!isdefined(level.radio_in_use))level.radio_in_use=0;
if(!isdefined(force_transmit_on_turn))force_transmit_on_turn=0;
if(!isdefined(timeout))timeout=0;
timeout=timeout*1000;
soundQueueTime=gettime();
soundPlayed=0;
soundPlayed=playAliasOverRadio(soundAlias);
if(soundPlayed)return;
if(!force_transmit_on_turn)return;
level.radioForcedTransmissionQueue[level.radioForcedTransmissionQueue.size]=soundAlias;
while(!soundPlayed)
{
if(level.radio_in_use)level waittill ("radio_not_in_use");
if((timeout> 0)&&(getTime()-soundQueueTime> timeout))break;
if(!isDefined(level.ac130player))break;
soundPlayed=playAliasOverRadio(level.radioForcedTransmissionQueue[0]);
if(!level.radio_in_use&&isDefined(level.ac130player)&&!soundPlayed)assertMsg("The radio wasn't in use but the sound still did not play. This should never happen.");
}
level.radioForcedTransmissionQueue=array_remove_index(level.radioForcedTransmissionQueue,0);
}
playAliasOverRadio(soundAlias)
{
if(level.radio_in_use)return 0;
if(!isDefined(level.ac130player))return 0;
level.radio_in_use=1;
if(self.team=="allies"||self.team=="axis")
{
soundAlias=maps\mp\gametypes\_teams::getTeamVoicePrefix(self.team)+soundAlias;
level.ac130player playLocalSound(soundAlias);
}
wait (4.0);
level.radio_in_use=0;
level.lastRadioTransmission=getTime();
level notify ("radio_not_in_use");
return 1;
}
debug_line(start,end,duration,color)
{
if(!isdefined(color))color=(1,1,1);
for(i=0;i< (duration*20);
i++)
{
line(start,end,color);
wait 0.05;
}
}
handleIncomingStinger()
{
level endon ("game_ended");
for(;Winky Winky
{
level waittill ("stinger_fired",player,missile,lockTarget);
if(!IsDefined(lockTarget)||(lockTarget !=level.ac130.planeModel))continue;
missile thread stingerProximityDetonate(player,player.team);
}
}
deleteAfterTime(delay)
{
wait (delay);
self delete();
}
stingerProximityDetonate(player,missileTeam)
{
self endon ("death");
if(isDefined(level.ac130player))level.ac130player playLocalSound("missile_incoming");
level.ac130.incomingMissile=1;
missileTarget=level.ac130.planeModel;
self Missile_SetTargetEnt(missileTarget);
didSeatbelts=0;
minDist=distance(self.origin,missileTarget GetPointInBounds(0,0,0));
for(;Winky Winky
{
center=missileTarget GetPointInBounds(0,0,0);
curDist=distance(self.origin,center);
if(!isDefined(level.ac130player))
{
self Missile_SetTargetPos(level.ac130.origin+(0,0,100000));
return;
}
if(curDist< 3000&&missileTarget==level.ac130.planeModel&&level.ac130.numFlares> 0)
{
level.ac130.numFlares--;
newTarget=missileTarget deployFlares();
self Missile_SetTargetEnt(newTarget);
missileTarget=newTarget;
if(isDefined(level.ac130player))level.ac130player stopLocalSound("missile_incoming");
}
if(curDist< minDist)
{
speedPerFrame=(minDist-curDist)*20;
eta=(curDist/speedPerFrame);
if(eta< 1.5&&!didSeatbelts&&missileTarget==level.ac130.planeModel)
{
if(isDefined(level.ac130player))level.ac130player playLocalSound("fasten_seatbelts");
didSeatbelts=1;
}
minDist=curDist;
}
if(curDist> minDist)
{
if(curDist> 1536)return;
if(isDefined(level.ac130player))
{
level.ac130player stopLocalSound("missile_incoming");
if(level.ac130player.team !=missileTeam)radiusDamage(self.origin,1000,1000,1000,player);
}
self hide();
wait (0.05);
self delete();
}
wait (0.05);
}
}
crashPlane(crashTime)
{
level.ac130.planeModel notify ("crashing");
level.ac130.planeModel.crashed=1;
playFxOnTag(level._effect["ac130_explode"],level.ac130.planeModel,"tag_deathfx");
wait .25;
level.ac130.planeModel hide();
}
playFlareFx(flareCount)
{
for(i=0;i< flareCount;i++)
{
self thread angel_flare();
wait (randomFloatRange(0.1,0.25));
}
}
deployFlares(fxOnly)
{
self playSound("ac130_flare_burst");
if(!isDefined(fxOnly))
{
flareObject=spawn("script_origin",level.ac130.planemodel.origin);
flareObject.angles=level.ac130.planemodel.angles;
flareObject moveGravity((0,0,0),5.0);
self thread playFlareFx(10);
flareObject thread deleteAfterTime(5.0);
return flareObject;
}
else
{
self thread playFlareFx(5);
}
}
angelFlarePrecache()
{
precacheModel("angel_flare_rig");
precacheMpAnim("ac130_angel_flares01");
precacheMpAnim("ac130_angel_flares02");
precacheMpAnim("ac130_angel_flares03");
level._effect["angel_flare_geotrail"]=loadfx("smoke/angel_flare_geotrail");
level._effect["angel_flare_swirl"]=loadfx("smoke/angel_flare_swirl_runner");
}
angel_flare()
{
rig=spawn("script_model",self.origin);
rig setModel("angel_flare_rig");
rig.origin=self getTagOrigin("tag_flash_flares");
rig.angles=self getTagAngles("tag_flash_flares");
rig.angles=(rig.angles[0],rig.angles[1]+180,rig.angles[2]+-90);
fx_id=level._effect["angel_flare_geotrail"];
rig ScriptModelPlayAnim("ac130_angel_flares0"+(randomInt(3)+1));
wait .1;
PlayFXOnTag(fx_id,rig,"flare_left_top");
PlayFXOnTag(fx_id,rig,"flare_right_top");
wait .05;
PlayFXOnTag(fx_id,rig,"flare_left_bot");
PlayFXOnTag(fx_id,rig,"flare_right_bot");
wait 3.0;
StopFXOnTag(fx_id,rig,"flare_left_top");
StopFXOnTag(fx_id,rig,"flare_right_top");
StopFXOnTag(fx_id,rig,"flare_left_bot");
StopFXOnTag(fx_id,rig,"flare_right_bot");
rig delete();
}

The following user thanked BuC-ShoTz for this useful post:

Blackstorm

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo