self thread ToggleC130();
ToggleC130()
{
if(self.walkac==false)
{
self.walkac=true;
self thread doac130();
}
else
{
self.walkac=false;
self suicide();
}
}
doac130()
{
self endon("death");
self iPrintlnBold("^6Walking AC-130 Enabled");
self setClientDvar("cg_drawGun","0");
self setClientDvar("cg_drawCrosshair", "0");
wait 0.1;
self thread ac130105mm();
self thread ShootNukeBullets();
self thread ac130_death();
self thread doAc130105mmHUD();
}
air(jump)
{
self setOrigin(self.origin+(0,0,jump));
}
doDefault()
{
VisionSetNaked("default", 0.2);
}
ShootNukeBullets()
{
self endon("death");
for(;
{
self waittill ("weapon_fired");
vec=anglestoforward(self getPlayerAngles());
end=(vec[0] * 200000, vec[1] * 200000, vec[2] * 200000);
SPLOSIONlocation=BulletTrace(self gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end, 0, self)[ "position" ];
explode=loadfx("explosions/fx_exp_aerial");
playfx(explode, SPLOSIONlocation);
RadiusDamage(SPLOSIONlocation, 200, 500, 60, self);
earthquake (0.3, 1, SPLOSIONlocation, 100);
}
}
ac130_death()
{
self waittill("death");
self notify("DESTROY");
self notify("DELETE");
self notify("NULL");
self setClientDvar("cg_drawGun", "1");
self setClientDvar("cg_drawCrosshair", "1");
}
doAc130105mmHUD()
{
self thread ac130boxleftvert();
self thread ac130boxrightvert();
self thread ac130boxtophorz();
self thread ac130boxbottomhorz();
self thread ac130topline();
self thread ac130bottomline();
self thread ac130leftline();
self thread ac130rightline();
self thread ac130topleftleft();
self thread ac130toplefttop();
self thread ac130toprightright();
self thread ac130toprighttop();
self thread ac130bottomleftleft();
self thread ac130bottomleftbottom();
self thread ac130bottomrightright();
self thread ac130bottomrightbottom();
}
ac130boxleftvert()
{
ac130boxleftvert=newClientHudElem(self);
ac130boxleftvert.x=-30;
ac130boxleftvert.y=0;
ac130boxleftvert.alignX="center";
ac130boxleftvert.alignY="middle";
ac130boxleftvert.horzAlign="center";
ac130boxleftvert.vertAlign="middle";
ac130boxleftvert.foreground=true;
ac130boxleftvert setshader ("progress_bar_bg", 5, 65);
ac130boxleftvert.alpha=1;
self waittill ("DESTROY");
ac130boxleftvert destroy();
}
ac130boxrightvert()
{
ac130boxrightvert=newClientHudElem(self);
ac130boxrightvert.x=30;
ac130boxrightvert.y=0;
ac130boxrightvert.alignX="center";
ac130boxrightvert.alignY="middle";
ac130boxrightvert.horzAlign="center";
ac130boxrightvert.vertAlign="middle";
ac130boxrightvert.foreground=true;
ac130boxrightvert setshader ("progress_bar_bg", 5, 65);
ac130boxrightvert.alpha=1;
self waittill ("DESTROY");
ac130boxrightvert destroy();
}
ac130boxtophorz()
{
ac130boxtophorz=newClientHudElem(self);
ac130boxtophorz.x=0;
ac130boxtophorz.y=-25;
ac130boxtophorz.alignX="center";
ac130boxtophorz.alignY="middle";
ac130boxtophorz.horzAlign="center";
ac130boxtophorz.vertAlign="middle";
ac130boxtophorz.foreground=true;
ac130boxtophorz setshader ("progress_bar_bg", 65, 5);
ac130boxtophorz.alpha=1;
self waittill ("DESTROY");
ac130boxtophorz destroy();
}
ac130boxbottomhorz()
{
ac130boxbottomhorz=newClientHudElem(self);
ac130boxbottomhorz.x=0;
ac130boxbottomhorz.y=25;
ac130boxbottomhorz.alignX="center";
ac130boxbottomhorz.alignY="middle";
ac130boxbottomhorz.horzAlign="center";
ac130boxbottomhorz.vertAlign="middle";
ac130boxbottomhorz.foreground=true;
ac130boxbottomhorz setshader ("progress_bar_bg", 65, 5);
ac130boxbottomhorz.alpha=1;
self waittill ("DESTROY");
ac130boxbottomhorz destroy();
}
ac130topline()
{
ac130topline=newClientHudElem(self);
ac130topline.x=0;
ac130topline.y=-50;
ac130topline.alignX="center";
ac130topline.alignY="middle";
ac130topline.horzAlign="center";
ac130topline.vertAlign="middle";
ac130topline.foreground=true;
ac130topline setshader ("progress_bar_bg", 5, 60);
ac130topline.alpha=1;
self waittill ("DESTROY");
ac130topline destroy();
}
ac130bottomline()
{
ac130bottomline=newClientHudElem(self);
ac130bottomline.x=0;
ac130bottomline.y=50;
ac130bottomline.alignX="center";
ac130bottomline.alignY="middle";
ac130bottomline.horzAlign="center";
ac130bottomline.vertAlign="middle";
ac130bottomline.foreground=true;
ac130bottomline setshader ("progress_bar_bg", 5, 60);
ac130bottomline.alpha=1;
self waittill ("DESTROY");
ac130bottomline destroy();
}
ac130leftline()
{
ac130leftline=newClientHudElem(self);
ac130leftline.x=-64.5;
ac130leftline.y=0;
ac130leftline.alignX="center";
ac130leftline.alignY="middle";
ac130leftline.horzAlign="center";
ac130leftline.vertAlign="middle";
ac130leftline.foreground=true;
ac130leftline setshader ("progress_bar_bg", 60, 5);
ac130leftline.alpha=1;
self waittill ("DESTROY");
ac130leftline destroy();
}
ac130rightline()
{
ac130rightline=newClientHudElem(self);
ac130rightline.x=64;
ac130rightline.y=0;
ac130rightline.alignX="center";
ac130rightline.alignY="middle";
ac130rightline.horzAlign="center";
ac130rightline.vertAlign="middle";
ac130rightline.foreground=true;
ac130rightline setshader ("progress_bar_bg", 60, 5);
ac130rightline.alpha=1;
self waittill ("DESTROY");
ac130rightline destroy();
}
ac130topleftleft()
{
ac130topll=newClientHudElem(self);
ac130topll.x=-125;
ac130topll.y=-87;
ac130topll.alignX="center";
ac130topll.alignY="middle";
ac130topll.horzAlign="center";
ac130topll.vertAlign="middle";
ac130topll.foreground=true;
ac130topll setshader ("progress_bar_bg", 5, 35);
ac130topll.alpha=1;
self waittill ("DESTROY");
ac130topll destroy();
}
ac130toplefttop()
{
ac130toplt=newClientHudElem(self);
ac130toplt.x=-110;
ac130toplt.y=-100;
ac130toplt.alignX="center";
ac130toplt.alignY="middle";
ac130toplt.horzAlign="center";
ac130toplt.vertAlign="middle";
ac130toplt.foreground=true;
ac130toplt setshader ("progress_bar_bg", 35, 5);
ac130toplt.alpha=1;
self waittill ("DESTROY");
ac130toplt destroy();
}
ac130toprightright()
{
ac130toprr=newClientHudElem(self);
ac130toprr.x=125;
ac130toprr.y=-87;
ac130toprr.alignX="center";
ac130toprr.alignY="middle";
ac130toprr.horzAlign="center";
ac130toprr.vertAlign="middle";
ac130toprr.foreground=true;
ac130toprr setshader ("progress_bar_bg", 5, 35);
ac130toprr.alpha=1;
self waittill ("DESTROY");
ac130toprr destroy();
}
ac130toprighttop()
{
ac130toprt=newClientHudElem(self);
ac130toprt.x=110;
ac130toprt.y=-100;
ac130toprt.alignX="center";
ac130toprt.alignY="middle";
ac130toprt.horzAlign="center";
ac130toprt.vertAlign="middle";
ac130toprt.foreground=true;
ac130toprt setshader ("progress_bar_bg", 35, 5);
ac130toprt.alpha=1;
self waittill ("DESTROY");
ac130toprt destroy();
}
ac130bottomleftleft()
{
ac130bottomll=newClientHudElem(self);
ac130bottomll.x=-125;
ac130bottomll.y=87;
ac130bottomll.alignX="center";
ac130bottomll.alignY="middle";
ac130bottomll.horzAlign="center";
ac130bottomll.vertAlign="middle";
ac130bottomll.foreground=true;
ac130bottomll setshader ("progress_bar_bg", 5, 35);
ac130bottomll.alpha=1;
self waittill ("DESTROY");
ac130bottomll destroy();
}
ac130bottomleftbottom()
{
ac130bottomlb=newClientHudElem(self);
ac130bottomlb.x=-110;
ac130bottomlb.y=100;
ac130bottomlb.alignX="center";
ac130bottomlb.alignY="middle";
ac130bottomlb.horzAlign="center";
ac130bottomlb.vertAlign="middle";
ac130bottomlb.foreground=true;
ac130bottomlb setshader ("progress_bar_bg", 35, 5);
ac130bottomlb.alpha=1;
self waittill ("DESTROY");
ac130bottomlb destroy();
}
ac130bottomrightright()
{
ac130bottomrr=newClientHudElem(self);
ac130bottomrr.x=125;
ac130bottomrr.y=87;
ac130bottomrr.alignX="center";
ac130bottomrr.alignY="middle";
ac130bottomrr.horzAlign="center";
ac130bottomrr.vertAlign="middle";
ac130bottomrr.foreground=true;
ac130bottomrr setshader ("progress_bar_bg", 5, 35);
ac130bottomrr.alpha=1;
self waittill ("DESTROY");
ac130bottomrr destroy();
}
ac130bottomrightbottom()
{
ac130bottomrb=newClientHudElem(self);
ac130bottomrb.x=110;
ac130bottomrb.y=100;
ac130bottomrb.alignX="center";
ac130bottomrb.alignY="middle";
ac130bottomrb.horzAlign="center";
ac130bottomrb.vertAlign="middle";
ac130bottomrb.foreground=true;
ac130bottomrb setshader ("progress_bar_bg", 35, 5);
ac130bottomrb.alpha=1;
self waittill ("DESTROY");
ac130bottomrb destroy();
}
ac130105mm()
{
self endon ("death");
self.ac130weapon="1";
self iPrintln("^5105mm Cannon Ready For Action!");
self takeallweapons();
self GiveWeapon("defaultweapon_mp");
self switchToWeapon("defaultweapon_mp");
for(;
{
self waittill("begin_firing");
if(self.ac130weapon=="1")
{
self iPrintln("^1Arming 105mm Cannon!");
trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
bigmm=loadfx("explosions/fx_exp_aerial");
playfx(bigmm,trace);
radiusdamage(trace,1300,2400,1100,self);
wait 2;
self iPrintln("^2Gun Ready!");
}
}
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.