Post: TSMHeli Function Released
07-01-2015, 08:27 PM #1
itsSorrow
In my man cave
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NGU, you guys are probably wondering what TSMHeli is! If you don't its one of my biggest projects i'm working on! I finally finished it! Its kind of like SS Billcam but others can't ride it Sad Awesome I will be fixing that soon. But it has the same model and you can pick where ever you want to put it!
So here is how it looks like!

Video:


    
TSMHeli()
{
if(level.pilotHeliOn == 0)
{
level.pilotHeliOn = 1;
if(level.PHeliCheck == 0)
{
level.PHeliCheck = 1;
self thread PHeliModellb();
}
self thread comePilotHeli();
}
else
{
}
}
comePilotHeli()
{
self endon("disconnect");
self endon("stop_comePHeli");
for(;Winky Winky
{
if(level.comePHeliOn == 0)
{
wait 1;
Location = locationSelector();
level.comePHeliOn = 1;
}
if(level.comePHeliOn == 1)
{
level.PHeli = spawnHelicopter(self, self.origin + (12000, 0, 1500), self.angles, level.PHeliModel, level.PHeliModel2);
level.PHeli.owner = self;
level.PHeli.team = self.team;
level.comePHeliOn = 2;
}
if(level.comePHeliOn == 2)
{
level.PHeli setSpeed(1000, 25);
level.PHeli setVehGoalPos(Location + (0, 0, 1500), 1);
wait 14;
level.PHeli setSpeed(200, 20);
level.PHeli setVehGoalPos(Location + (0, 0, 65), 1);
level.comePHeliOn = 0;
foreach(p in level.players)
{
p thread ridePilotHeli();
}
self notify("stop_comePHeli");
}
wait 0.05;
}
}
ridePilotHeli()
{
self endon("disconnect");
self endon("stop_ridePHeli");
for(;Winky Winky
{
self.ridePHeliInfo destroy();
if(distance(self.origin, level.PHeli.origin) < 150)
{
self.ridePHeliInfo = self createFontString("hudbig", 1.Cool Man (aka Tustin);
self.ridePHeliInfo setPoint( "TOP", "TOP", 0, 50 );
self.ridePHeliInfo setText("^3Press [{+usereload}] to ^1Ride on TSMHeli");

if(self useButtonPressed())
{
self disableWeapons();
self detachAll();
self hide();
self setclientthirdperson(1);
self EnableInvulnerability();
self thread movePilotHeli();
self thread stopPilotHeli();
self thread exitPilotHeli();
self thread infoPHeliOn();
}
}
wait 0.05;
}
}
infoPHeliOn()
{
self iPrintln("^0[{+attack}] ^2Accel\n^0[{+frag}] ^2Rise\n^0[{+smoke}] ^2Fall\n[{+melee}] ^5Exit The TSM and Spawn Trickshotting Platform");
self.PHeliInfoOn fadeAlphaChange(.2, 1);

foreach(p in level.players)
{
p notify("stop_ridePHeli");
p.ridePHeliInfo destroy();
}
}
infoPHeliOff()
{
self.PHeliInfoOn fadeAlphaChange(.2, 0);
wait 0.2;
self.PHeliInfoOn destroy();
}
movePilotHeli()
{
self endon("disconnect");
self endon("stop_movePHeli");
self PlayerLinkTo(level.PHeli);
self setPlayerAngles(level.PHeli.angles + (0, 0, 0));
self setOrigin(((level.PHeli.origin + (-200, 0, 150)) + (AnglesToForward(level.PHeli.angles) * 30) + (0, 0, 3)));
level.PHeliSpeed = 0;
PHeliTrace = undefined;
newPHeliAngles = undefined;

for(;Winky Winky
{
PHeliTrace = playerAnglesToForward(self, 200 + level.PHeliSpeed);
if(self attackButtonPressed())
{
if(level.PHeliSpeed < 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed < 500)
{
level.PHeliSpeed += 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(PHeliTrace, 1);
}
}
if(self fragButtonPressed())
{
if(level.PHeliSpeed < 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed < 500)
{
level.PHeliSpeed += 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(level.PHeli.origin + (0, 0, level.PHeliSpeed), 1);
}
}
if(self secondaryOffhandButtonPressed())
{
if(level.PHeliSpeed > 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed > -500)
{
level.PHeliSpeed -= 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(level.PHeli.origin + (0, 0, level.PHeliSpeed), 1);
}
}
if(level.PHeliSpeed == 500)
{
level.PHeliSpeed = 400;
}
if(level.PHeliSpeed == -500)
{
level.PHeliSpeed = -400;
}
wait 0.05;
}
}
initPHeliCP()
{
while (isDefined(self.spawnedcrate[0][0]))
{
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] delete();
d++;
}
i++;
}
}
startpos = self.origin + (0, 0, -15);
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] = spawn("script_model", startpos + (d * 40, i * 70, 0));
self.spawnedcrate[i][d] setmodel("t6_wpn_supply_drop_ally");
d++;
}
i++;
}
self iprintln("^2Platform Spawned!");
wait 1;
}
stopPilotHeli()
{
self endon("disconnect");
self endon("stop_stopPHeli");

for(;Winky Winky
{
if(self stanceButtonPressed())
{
self notify("stop_movePHeli");
self notify("stop_exitPHeli");

level.PHeliSpeed = 0;
setDvar("cg_thirdPersonRange", "100");

self.PHeliNowWeap destroy();
self.PHeliNowAction destroy();
self thread infoPHeliOff();
self unlink();
self show();
self setClientThirdPerson(0);
foreach(p in level.players)
{
p thread ridePilotHeli();
}
self notify("stop_stopPHeli");
}
wait 0.05;
}
}
exitPilotHeli()
{
self endon("disconnect");
self endon("stop_exitPHeli");

for(;Winky Winky
{
if(self meleeButtonPressed())
{
self notify("stop_movePHeli");
self notify("stop_attackPHeli");
self notify("stop_stopPHeli");
self notify("stop_bombUsing");

level.PHeliSpeed = 0;
setDvar("cg_thirdPersonRange", "100");

self.PHeliNowWeap destroy();
self.PHeliNowAction destroy();
self thread infoPHeliOff();
self thread initPHeliCP();
self unlink();
self enableWeapons();
self show();
self setClientThirdPerson(0);
level.PHeli delete();
level.pilotHeliOn = 0;
self notify("stop_exitPHeli");
}
wait 0.05;
}
}
locationSelector()
{
self beginLocationSelection( "map_mortar_selector" );
self disableoffhandweapons();
self giveWeapon( "killstreak_remote_turret_mp" );
self switchToWeapon( "killstreak_remote_turret_mp" );
self.selectingLocation = 1;
self waittill("confirm_location", location);
newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
self endLocationSelection();
self enableoffhandweapons();
self switchToWeapon(self maps\mp\_utility::getlastweapon());
self.selectingLocation = undefined;
return newLocation;
}
PHeliModellb()
{
changePHeliType("heli_guard_mp", "veh_t6_air_v78_vtol_killstreak", "VTOL Warship");
}
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];
}
changePHeliType(code, code2, print)
{
level.PHeliCheck = 1;
level.PHeliModel = code;
level.PHeliModel2 = code2;
self PHeliModellb();
}


Credits:
Asty - Mostly Because Of The AirCraft Code
Me - Editing it and making it for trickshotters
Whoever Made The Platform code
And NGU
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked itsSorrow for this useful post:

Rezqaazify
07-01-2015, 08:29 PM #2
FRINZ
I’m too L33T
LOL bruh

The following user thanked FRINZ for this useful post:

My Ninja Defuse
07-01-2015, 08:30 PM #3
itsSorrow
In my man cave
Originally posted by FRlNZ View Post
LOL bruh


What?
07-01-2015, 10:54 PM #4
Vondy Supreme
< ^ > < ^ >
The code looks a lot like the "Pilot Helicopter" from ELeGanCe and a few other menus.
07-02-2015, 12:13 AM #5
itsSorrow
In my man cave
Originally posted by EliteGamer01031 View Post
The code looks a lot like the "Pilot Helicopter" from ELeGanCe and a few other menus.


Don't you read the credits?
07-02-2015, 03:11 AM #6
mrtn
Little One
Originally posted by Matroix7 View Post
Hello NGU, you guys are probably wondering what TSMHeli is! If you don't its one of my biggest projects i'm working on! I finally finished it! Its kind of like SS Billcam but others can't ride it Sad Awesome I will be fixing that soon. But it has the same model and you can pick where ever you want to put it!
So here is how it looks like!

Video:


    
TSMHeli()
{
if(level.pilotHeliOn == 0)
{
level.pilotHeliOn = 1;
if(level.PHeliCheck == 0)
{
level.PHeliCheck = 1;
self thread PHeliModellb();
}
self thread comePilotHeli();
}
else
{
}
}
comePilotHeli()
{
self endon("disconnect");
self endon("stop_comePHeli");
for(;Winky Winky
{
if(level.comePHeliOn == 0)
{
wait 1;
Location = locationSelector();
level.comePHeliOn = 1;
}
if(level.comePHeliOn == 1)
{
level.PHeli = spawnHelicopter(self, self.origin + (12000, 0, 1500), self.angles, level.PHeliModel, level.PHeliModel2);
level.PHeli.owner = self;
level.PHeli.team = self.team;
level.comePHeliOn = 2;
}
if(level.comePHeliOn == 2)
{
level.PHeli setSpeed(1000, 25);
level.PHeli setVehGoalPos(Location + (0, 0, 1500), 1);
wait 14;
level.PHeli setSpeed(200, 20);
level.PHeli setVehGoalPos(Location + (0, 0, 65), 1);
level.comePHeliOn = 0;
foreach(p in level.players)
{
p thread ridePilotHeli();
}
self notify("stop_comePHeli");
}
wait 0.05;
}
}
ridePilotHeli()
{
self endon("disconnect");
self endon("stop_ridePHeli");
for(;Winky Winky
{
self.ridePHeliInfo destroy();
if(distance(self.origin, level.PHeli.origin) < 150)
{
self.ridePHeliInfo = self createFontString("hudbig", 1.Cool Man (aka Tustin);
self.ridePHeliInfo setPoint( "TOP", "TOP", 0, 50 );
self.ridePHeliInfo setText("^3Press [{+usereload}] to ^1Ride on TSMHeli");

if(self useButtonPressed())
{
self disableWeapons();
self detachAll();
self hide();
self setclientthirdperson(1);
self EnableInvulnerability();
self thread movePilotHeli();
self thread stopPilotHeli();
self thread exitPilotHeli();
self thread infoPHeliOn();
}
}
wait 0.05;
}
}
infoPHeliOn()
{
self iPrintln("^0[{+attack}] ^2Accel\n^0[{+frag}] ^2Rise\n^0[{+smoke}] ^2Fall\n[{+melee}] ^5Exit The TSM and Spawn Trickshotting Platform");
self.PHeliInfoOn fadeAlphaChange(.2, 1);

foreach(p in level.players)
{
p notify("stop_ridePHeli");
p.ridePHeliInfo destroy();
}
}
infoPHeliOff()
{
self.PHeliInfoOn fadeAlphaChange(.2, 0);
wait 0.2;
self.PHeliInfoOn destroy();
}
movePilotHeli()
{
self endon("disconnect");
self endon("stop_movePHeli");
self PlayerLinkTo(level.PHeli);
self setPlayerAngles(level.PHeli.angles + (0, 0, 0));
self setOrigin(((level.PHeli.origin + (-200, 0, 150)) + (AnglesToForward(level.PHeli.angles) * 30) + (0, 0, 3)));
level.PHeliSpeed = 0;
PHeliTrace = undefined;
newPHeliAngles = undefined;

for(;Winky Winky
{
PHeliTrace = playerAnglesToForward(self, 200 + level.PHeliSpeed);
if(self attackButtonPressed())
{
if(level.PHeliSpeed < 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed < 500)
{
level.PHeliSpeed += 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(PHeliTrace, 1);
}
}
if(self fragButtonPressed())
{
if(level.PHeliSpeed < 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed < 500)
{
level.PHeliSpeed += 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(level.PHeli.origin + (0, 0, level.PHeliSpeed), 1);
}
}
if(self secondaryOffhandButtonPressed())
{
if(level.PHeliSpeed > 0)
{
level.PHeliSpeed = 0;
}
if(level.PHeliSpeed > -500)
{
level.PHeliSpeed -= 5;
level.PHeli setYawSpeed(150, 80);
level.PHeli setSpeed(270, 90);
level.PHeli setVehGoalPos(level.PHeli.origin + (0, 0, level.PHeliSpeed), 1);
}
}
if(level.PHeliSpeed == 500)
{
level.PHeliSpeed = 400;
}
if(level.PHeliSpeed == -500)
{
level.PHeliSpeed = -400;
}
wait 0.05;
}
}
initPHeliCP()
{
while (isDefined(self.spawnedcrate[0][0]))
{
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] delete();
d++;
}
i++;
}
}
startpos = self.origin + (0, 0, -15);
i = -3;
while (i < 3)
{
d = -3;
while (d < 3)
{
self.spawnedcrate[i][d] = spawn("script_model", startpos + (d * 40, i * 70, 0));
self.spawnedcrate[i][d] setmodel("t6_wpn_supply_drop_ally");
d++;
}
i++;
}
self iprintln("^2Platform Spawned!");
wait 1;
}
stopPilotHeli()
{
self endon("disconnect");
self endon("stop_stopPHeli");

for(;Winky Winky
{
if(self stanceButtonPressed())
{
self notify("stop_movePHeli");
self notify("stop_exitPHeli");

level.PHeliSpeed = 0;
setDvar("cg_thirdPersonRange", "100");

self.PHeliNowWeap destroy();
self.PHeliNowAction destroy();
self thread infoPHeliOff();
self unlink();
self show();
self setClientThirdPerson(0);
foreach(p in level.players)
{
p thread ridePilotHeli();
}
self notify("stop_stopPHeli");
}
wait 0.05;
}
}
exitPilotHeli()
{
self endon("disconnect");
self endon("stop_exitPHeli");

for(;Winky Winky
{
if(self meleeButtonPressed())
{
self notify("stop_movePHeli");
self notify("stop_attackPHeli");
self notify("stop_stopPHeli");
self notify("stop_bombUsing");

level.PHeliSpeed = 0;
setDvar("cg_thirdPersonRange", "100");

self.PHeliNowWeap destroy();
self.PHeliNowAction destroy();
self thread infoPHeliOff();
self thread initPHeliCP();
self unlink();
self enableWeapons();
self show();
self setClientThirdPerson(0);
level.PHeli delete();
level.pilotHeliOn = 0;
self notify("stop_exitPHeli");
}
wait 0.05;
}
}
locationSelector()
{
self beginLocationSelection( "map_mortar_selector" );
self disableoffhandweapons();
self giveWeapon( "killstreak_remote_turret_mp" );
self switchToWeapon( "killstreak_remote_turret_mp" );
self.selectingLocation = 1;
self waittill("confirm_location", location);
newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
self endLocationSelection();
self enableoffhandweapons();
self switchToWeapon(self maps\mp\_utility::getlastweapon());
self.selectingLocation = undefined;
return newLocation;
}
PHeliModellb()
{
changePHeliType("heli_guard_mp", "veh_t6_air_v78_vtol_killstreak", "VTOL Warship");
}
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];
}
changePHeliType(code, code2, print)
{
level.PHeliCheck = 1;
level.PHeliModel = code;
level.PHeliModel2 = code2;
self PHeliModellb();
}


Credits:
Asty - Mostly Because Of The AirCraft Code
Me - Editing it and making it for trickshotters
Whoever Made The Platform code
And NGU


All you did was change the model and remove some text Facepalm
Why are you re-releasing an existing function that you made nearly zero changes to? Oh yes, you want +rep

The following user thanked mrtn for this useful post:

FRINZ
07-02-2015, 03:15 AM #7
itsSorrow
In my man cave
Originally posted by 0x0000000 View Post
All you did was change the model and remove some text Facepalm
Why are you re-releasing an existing function that you made nearly zero changes to? Oh yes, you want +rep


I want rep? Explain that... I barely even release shit and you did the exact same thing so don't say shit
07-02-2015, 05:17 AM #8
ishangiri2014
Ling Ling Ho
Originally posted by Matroix7 View Post
I want rep? Explain that... I barely even release shit and you did the exact same thing so don't say shit


there is a thread already to release this and why would you make a new thread for a small function?
07-02-2015, 05:35 AM #9
itsSorrow
In my man cave
Originally posted by ishangiri2014 View Post
there is a thread already to release this and why would you make a new thread for a small function?


There is not a thread released to this,.. and its not a small function.. You want a small function? Look at the godmode function
07-02-2015, 07:13 AM #10
maybe u modified and take the code from anywhere but still a nice release thx man

The following user thanked Rezqaazify for this useful post:

itsSorrow

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo