Post: Juggernaut Code
07-28-2012, 06:26 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Well this is a Juggernaut code I coded in like 5 mins lol
I'm going to improve it so don't think it's going to stay like this.

Yes I know it's alot of code but, I'm fixing that to make it smaller.
    
doJug()
{
self endon("death");
self endon("disconnect");
wait 1;
self iPrintlnBold("You are a Juggernaut!");
self iPrintlnBold("For one minute!");
self thread doWarn();
VisionSetNaked( "blacktest", .2 );
wait 4;
VisionSetNaked( "thermal_mp", .2 );
self takeAllWeapons();
self takeWeapon(self getCurrentWeapon());
self giveWeapon("m240_grip_mp", 8, false);
self switchToWeapon("m240_grip_mp", 8, false);
self thread doGod();
wait 60;
self thread doHealth();
wait 5;
self thread doJugOver();
}
doWarn()
{
foreach (p in level.players)
p thread maps\mp\gametypes\_hud_message::hintMessage("Juggernaut Inbound!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Watch your back!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Kill the Juggernaut!");
}
doJugOver()
{
foreach (p in level.players)
p thread maps\mp\gametypes\_hud_message::hintMessage("Juggernaut has died!");
VisionSetNaked( "default", .2 );
self playLocalSound("victory_music");
}
doGod()
{
self endon ( "disconnect" );
self endon ( "death" );
self iPrintlnBold("You now have a Juggernaut Suit");
self.maxhealth = 9500;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
doHealth()
{
self endon ( "disconnect" );
self endon ( "death" );
self iPrintlnBold("You have lost your Juggernaut Suit!");
self.maxhealth = 100;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to TheUnexpected for this useful post:

Josh Moss, Skurt, spudeeelad, This-Guyy
08-18-2012, 07:29 PM #11
Originally posted by another user
doWarn()
{
foreach (p in level.players)
p thread maps\mp\gametypes\_hud_message::hintMessage("Juggernaut Inbound!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Watch your back!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Kill the Juggernaut!");
}


Last edited by TheUnexpected; 07-29-2012 at 12:36 PM.

That's when it was last edited, and the code works 100%, I tested before I posted.
08-18-2012, 10:25 PM #12
spudeeelad
I defeated!
Originally posted by TheUnexpected View Post
Last edited by TheUnexpected; 07-29-2012 at 12:36 PM.

That's when it was last edited, and the code works 100%, I tested before I posted.


No idea bud. I'm not saying you're lying as your post clearly does say that, but when I copied it, I got an error just as the other guy did and had to fix it myself.

Oh well, I got it working and the other guy presumably has it working now too so it doesn't really matter. But cheers for the original code anyway Smile
08-18-2012, 11:18 PM #13
Y-U-FRONTIN
Save Point
use the blast sheild perk model in this code it sucks if you dont
Originally posted by TheUnexpected View Post
Well this is a Juggernaut code I coded in like 5 mins lol
I'm going to improve it so don't think it's going to stay like this.

Yes I know it's alot of code but, I'm fixing that to make it smaller.
    
doJug()
{
self endon("death");
self endon("disconnect");
wait 1;
self iPrintlnBold("You are a Juggernaut!");
self iPrintlnBold("For one minute!");
self thread doWarn();
VisionSetNaked( "blacktest", .2 );
wait 4;
VisionSetNaked( "thermal_mp", .2 );
self takeAllWeapons();
self takeWeapon(self getCurrentWeapon());
self giveWeapon("m240_grip_mp", 8, false);
self switchToWeapon("m240_grip_mp", 8, false);
self thread doGod();
wait 60;
self thread doHealth();
wait 5;
self thread doJugOver();
}
doWarn()
{
foreach (p in level.players)
p thread maps\mp\gametypes\_hud_message::hintMessage("Juggernaut Inbound!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Watch your back!");
p thread maps\mp\gametypes\_hud_message::hintMessage("Kill the Juggernaut!");
}
doJugOver()
{
foreach (p in level.players)
p thread maps\mp\gametypes\_hud_message::hintMessage("Juggernaut has died!");
VisionSetNaked( "default", .2 );
self playLocalSound("victory_music");
}
doGod()
{
self endon ( "disconnect" );
self endon ( "death" );
self iPrintlnBold("You now have a Juggernaut Suit");
self.maxhealth = 9500;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
doHealth()
{
self endon ( "disconnect" );
self endon ( "death" );
self iPrintlnBold("You have lost your Juggernaut Suit!");
self.maxhealth = 100;
self.health = self.maxhealth;
while ( 1 )
{
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}
08-18-2012, 11:39 PM #14
Cmd-X
It's been awhile.
Originally posted by makcim View Post
i get unistablished variable "p" ??? help??


Oh shit, in my thread, "p" was already defined, but not for yours, sorry :lol: :p

The following user thanked Cmd-X for this useful post:

Kitty=^.^=
08-19-2012, 02:32 AM #15
Skurt
Do a barrel roll!
Very Cool you should make it a game mode like juggy zombies.
08-20-2012, 02:42 PM #16
Thanks for the code, hopefully this works for the patch I'm editing.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo