FrostyLobbys
Veteran
- Messages
- 42
- Reaction score
- 23
- Points
- 568
I Am Updating My Teams Azza Menu And I Want To Add The Old Famous SS Billcam. Does Anybody Have The Code?
init()
{
precacheShader("progress_bar_fg_small");
}
drawBar(color, width, height, align, relative, x, y)
{
bar = createBar(color, width, height, self);
bar setPoint(align, relative, x, y);
bar.hideWhenInMenu = true;
return bar;
}
fadeAlphaChange(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}
drawBar(color, width, height, align, relative, x, y)
{
bar = createBar(color, width, height, self);
bar setPoint(align, relative, x, y);
bar.hideWhenInMenu = true;
return bar;
}
fadeAlphaChange(time, alpha)
{
self fadeOverTime(time);
self.alpha = alpha;
}
playerAnglesToForward(player, distance)
{
return player.origin + VectorScale(AnglesToForward(player getPlayerAngles(), distance));
}
traceBulletJet(traceDistance, traceReturn, detectPlayers)
{
if (!isDefined(traceDistance))
traceDistance = 10000000;
if (!isDefined(traceReturn))
traceReturn = "position";
if (!isDefined(detectPlayers))
detectPlayers = false;
return bulletTrace(self getEye(), self getEye() + VectorScale(AnglesToForward(self getPlayerAngles()), traceDistance), detectPlayers, self)[traceReturn];
}
//Main Code (Everyone can use)
//Main Code (Self only)
switchFJetModelMe(code, name)
{
self.FJetModel = code;
self.FJetMCheck = 1;
self changeFJetTPRMe();
}
changeFJetTPRMe()
{
if(self.FJetModel == "veh_t6_air_a10f_alt" || self.FJetModel == "veh_t6_air_v78_vtol_killstreak")
{
setDvar("cg_thirdPersonRange", "700");
}
else if(self.FJetModel == "veh_t6_air_fa38_killstreak" || self.FJetModel == "veh_t6_drone_pegasus_mp")
{
setDvar("cg_thirdPersonRange", "500");
}
else if(self.FJetModel == "veh_t6_drone_uav")
{
setDvar("cg_thirdPersonRange", "400");
}
}
setFJetMatbMe()
{
self switchFJetModelMe("veh_t6_air_a10f_alt", "A10 Thunderbolt");
}
setFJetMharrMe()
{
self switchFJetModelMe("veh_t6_air_fa38_killstreak", "Harrier");
}
setFJetMstbMe()
{
self switchFJetModelMe("veh_t6_drone_pegasus_mp", "Stealth Bomber");
}
initFlyableJetMe()
{
self endon("stop_threeFJetMe");
if(self.JetSpawned == 0)
{
self.JetSpawned = 1;
if(self.FJetMCheck == 0)
{
self setFJetMstbMe();
}
//self.FJet["setOrigin"] = self.origin + VectorScale(AnglesToForward((0, self getPlayerAngles()[1], self getPlayerAngles()[2])), 260);
//self.FJetEntity = spawn("script_model", self.FJet["setOrigin"] + (0, 0, 70));
//self.FJetEntity.angles = (0, 10, 0);
//self.FJetEntity setModel(self.FJetModel);
self.FJet["setOrigin"] = self.origin + vectorScale(anglesToForward((0, self getplayerangles()[1], self getplayerangles()[2])), 260);
self.FJetEntity = spawn("script_model", self.FJet["setOrigin"] + (-700, 0, 500));
self.FJetEntity.angles = (0, 10, 0);
self.FJetEntity setmodel(self.FJetModel);
self.FJetEntity moveto(self.FJet["setOrigin"] + (0, 0, 110), 4);
self iPrintlnbold("^3SS Bilcam ^2Spawned");
self thread doFlyableJetMe();
}
else
{
self iPrintlnbold("^3SS Bilcamis ^1already Spawned");
}
}
doFlyableJetMe()
{
self endon("disconnect");
self endon("stop_doFJetMe");
self endon("stop_threeFJetMe");
for(;;)
{
self.FJetRaidInfoMe destroy();
if(distance(self.origin, self.FJetEntity.origin) < 170)
{
self.FJetRaidInfoMe = self createFontString("hudbig", 1.8);
self.FJetRaidInfoMe setPoint("TOP", "TOP", 0, 50);
self.FJetRaidInfoMe setText("^3Press [{+usereload}] to ^1Ride on SS Bilcam");
if(self useButtonPressed())
{
self disableWeapons();
self detachAll();
self hide();
self enableInvulnerability();
self setclientthirdperson(1);
self thread moveFlyableJetMe();
self thread exitFlyableJetMe();
self thread doFJCInfoOnMe();
}
}
wait 0.05;
}
}
doFJCInfoOnMe()
{
if (self.initFJCInfoOnMe == 0)
{
self.FJCInfoOnMe = self drawText("[{+attack}] ^6Accelerate\n[{+melee}] ^6Exit SS Bilcam", "objective", 1.5, -280, 250, (1, 1, 1), 0, (0, 0, 1), 1, 1);
self.initFJCInfoOnMe = 1;
}
self.FJCInfoOnMe fadeAlphaChange(.2, 1);
self notify("stop_doFJetMe");
}
doFJCInfoOffMe()
{
self.FJCInfoOnMe fadeAlphaChange(.2, 0);
}
moveFlyableJetMe()
{
self endon("disconnect");
self endon("stop_driveFJetMe");
self.FJetRaidInfoMe destroy();
self changeFJetTPRMe();
//self setOrigin(((self.FJetEntity.origin) + (AnglesToForward(self.FJetEntity.angles) * 20) + (0, 0, 3)));
//self setPlayerAngles(self.FJetEntity.angles + (0, 0, 0));
//self PlayerLinkTo(self.FJetEntity);
self setorigin(self.fjetentity.origin + anglesToForward(self.fjetentity.angles) * 20 + (0, 0, 3));
self setplayerangles(self.fjetentity.angles + (0, 0, 0));
self playerlinkto(self.fjetentity);
jettrace = undefined;
newjetangles = undefined;
jettrace = playeranglestoforward(self, 100 + self.fjetspeed);
self.fjetentity rotateto(self getplayerangles(), 0.2);
self.FJetSBarMe = drawBar((1, 1, 1), 250, 7, "", "", 0, 170);
self.FJetSpeed = 0;
jetTrace = undefined;
newJetAngles = undefined;
for(;;)
{
jetTrace = playerAnglesToForward(self, 150 + self.FJetSpeed);
self.FJetEntity rotateTo(self getPlayerAngles(), 0.2);
if (self attackButtonPressed())
{
if(self.FJetSpeed < 0)
self.FJetSpeed = 0;
if(self.FJetSpeed < 250)
self.FJetSpeed += 0.5;
self.FJetEntity moveTo(jetTrace, 0.15);
}
else
{
if(self.FJetSpeed > 0)
{
newJetAngles = self getPlayerAngles();
self.FJetSpeed -= 2;
self.FJetEntity moveTo(jetTrace, 0.3);
}
}
self.FJetSBarMe updateBar(self.FJetSpeed / 250);
wait 0.05;
}
}
exitFlyableJetMe()
{
self endon("disconnect");
self endon("stop_oneExitFJetMe");
for(;;)
{
if(self meleeButtonPressed())
{
self notify("stop_driveFJetMe");
self notify("stop_weapSFJetMe");
self notify("stop_offRaidFJetMe");
self.FJetEntity delete();
self.JetSpawned = 0;
self.FJetSpeed = 0;
setDvar("cg_thirdPersonRange", "100");
self.FJetSBarMe destroyElem();
self.FJetNowWeapMe destroyElem();
self unlink();
self enableWeapons();
self show();
self setClientThirdPerson(0);
self disableInvulnerability();
self thread doFJCInfoOffMe();
self thread Platform();
self notify("stop_threeFJetMe");
self notify("stop_oneExitFJetMe");
}
wait 0.05;
}
}
WP(D,Z,P)
{
L=strTok(D,",");
for(i = 0 ; i < L.size; i += 2)
{
B = spawn("script_model",self.origin+(int(L),int(L[i+1]),Z));
if(!P)
B.angles=(90,0,0);
B setModel("t6_wpn_supply_drop_ally");
}
}
Platform()
{
location = self.origin;
while (isDefined(self.spawnedcrate[0][0]))
{
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[d] delete();
d++;
}
i++;
}
}
startpos = location + (0, 0, -10);
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[d] = spawn("script_model", startpos + (d * 40, i * 70, 0));
self.spawnedcrate[d] setmodel("t6_wpn_supply_drop_ally");
d++;
}
i++;
}
wait 1;
}
ENJOY YO ASS
If you get any problems with draw text please use my version of it:
Code:
drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;
if (!allclients)
textElem = self createFontString(font, fontScale);
else
textElem = level createServerFontString(font, fontScale);
textElem.x = x;
textElem.y = y;
textElem.color = color;
textElem.alpha = alpha;
textElem.glowColor = glowColor;
textElem.glowAlpha = glowAlpha;
textElem.sort = sort;
textElem.alpha = alpha;
textElem setText(text);
return textElem;
}