TheNiceUb3r
Veteran
- Messages
- 45
- Reaction score
- 46
- Points
- 793
This is a legit looking connection rupt for BO2
Enjoy
Precache This
// Function For Player
// Destroy The Shaders
// Shows for single players
// Turns it off
// Draws The Shaders
// Used For Freezing Players
// Used For Freezing The Whole Lobby
// Used for Teams
// Used For All Players
// Turns it on for all players
// Team Function For Your Team
// Function For Enemy Team
// HUD Text And Hud Rectangle
Credits
Me - Idea, Lining it all up correctly and making the team enemy all client functions
SeriousHD - The real looking freeze/snapnback
Extinct - Shader
DF_AUS - Being my homie + Helping fix it for self
Enjoy
Precache This
Code:
PrecacheShader("net_new_animation");
// Function For Player
Code:
GivePlayerFakeLag(player)
{
if(player.GiveFakeLagP == 0)
{
player.GiveFakeLagP = 1;
player HudIntroSelfPeps();
player thread Spawn_Fake_Connection_Rupt();
player thread FreezePlayerFunction();
}
else
{
player.GiveFakeLagP = 0;
player HudIntroSelfPepsOff();
player notify("StopTheFreezePlayer");
player thread DestroyTheFakeConnect();
}
}
// Destroy The Shaders
Code:
DestroyTheFakeConnect()
{
self.TCM ["TCMText"] destroy();
self.TCM ["TCMAnim"] destroy();
}
// Shows for single players
Code:
HudIntroSelfPeps()
{
self.IntroHuD = true;
}
// Turns it off
Code:
HudIntroSelfPepsOff()
{
self.IntroHuD = false;
}
// Draws The Shaders
Code:
Spawn_Fake_Connection_Rupt()
{
self.TCM ["TCMText"] = self createHudText( "CENTER", "CENTER", "default", 2.4, 2, -152, 1, 1,"Connection Interrupted" );
self.TCM ["TCMAnim"] = createHudRectangle("CENTER","CENTER", 0, 115, 73, 68, (255,255,255), "net_new_animation", 1, 1);
}
// Used For Freezing Players
Code:
FreezePlayerFunction()
{
self endon("StopTheFreezePlayer");
self.tempsnapshot = [];
while( self.GiveFakeLagSlf )
{
self.tempsnapshot["cweapon"] = self getcurrentweapon();
self.tempsnapshot["corigin"] = self getorigin();
self.tempsnapshot["cangles"] = self getplayerangles();
self.tempsnapshot["health"] = self.health;
wait RandomFloatRange(1,3);
self setOrigin( self.tempsnapshot["corigin"] );
self setPlayerAngles( self.tempsnapshot["cangles"] );
self switchtoweapon( self.tempsnapshot["cweapon"] );
self.health = self.tempsnapshot["health"];
}
}
// Used For Freezing The Whole Lobby
Code:
FreezePlayerFunctionAll()
{
self endon("StopFreezePlayerAll");
self.tempsnapshot = [];
while( 1 )
{
self.tempsnapshot["cweapon"] = self getcurrentweapon();
self.tempsnapshot["corigin"] = self getorigin();
self.tempsnapshot["cangles"] = self getplayerangles();
self.tempsnapshot["health"] = self.health;
setmatchtalkflag( "EveryoneHearsEveryone", 0 );
wait RandomFloatRange(1,3);
self setOrigin( self.tempsnapshot["corigin"] );
self setPlayerAngles( self.tempsnapshot["cangles"] );
self switchtoweapon( self.tempsnapshot["cweapon"] );
self.health = self.tempsnapshot["health"];
setmatchtalkflag( "EveryoneHearsEveryone", 1 );
}
}
// Used for Teams
Code:
ConnectionRuptSolo()
{
if(self.GiveFakeLagSlf == 0)
{
self.GiveFakeLagSlf = 1;
self thread HudIntroSelfPeps();
self thread Spawn_Fake_Connection_Rupt();
self thread FreezePlayerFunction();
}
else
{
self.GiveFakeLagSlf = 0;
self HudIntroSelfPepsOff();
self notify("StopTheFreezePlayer");
self DestroyTheFakeConnect();
}
}
// Used For All Players
Code:
ConnectionRuptSoloAll()
{
if(self.ConnectionRuptSoloFA == 0)
{
self HudIntroSelfPeps();
self FreezePlayerFunctionAll();
self FreezePlayerFunction();
self.ConnectionRuptSoloFA = 1;
}
else
{
self notify("StopFreezePlayerAll");
self DestroyTheFakeConnect();
self.ConnectionRuptSoloFA = 0;
}
}
// Turns it on for all players
Code:
ConnectionRuptAllPlayers()
{
foreach(player in level.players)
{
if (!player isHost() && player.status != "Co-Host" && player.status != "Admin" && player.status != "VIP" && player.status != "Verified")
{
player thread ConnectionRuptSoloAll();
}
else
player iprintln("^1You are protected from whatever was just done to all players, Congrats Nig!");
}
}
// Team Function For Your Team
Code:
ConnectionRuptMyTeam()
{
foreach(player in level.players)
{
if(self.pers["team"] == player.pers["team"])
{
player thread ConnectionRuptSolo();
}
}
}
// Function For Enemy Team
Code:
ConnectionRuptEnemeyTeam()
{
foreach(player in level.players)
{
if(self.pers["team"] != player.pers["team"])
{
player thread ConnectionRuptSolo();
}
}
}
// HUD Text And Hud Rectangle
Code:
createHudText( align, relative, font, fontScale, x, y, sort, alpha, text )
{
if(self.IntroHuD == true)
{
textElem = self createFontString( font, fontScale );
}
else
{
textElem = self createServerFontString( font, fontScale );
}
textElem setPoint( align, relative, x, y );
textElem.sort = sort;
textElem.alpha = alpha;
textElem.hideWhenInMenu = true;
textElem.foreground = true;
if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
level.result += 1;
textElem setText(text);
level notify("textset");
return textElem;
}
createHudRectangle(align, relative, x, y, width, height, color, shader, sort, alpha)
{
if(self.IntroHuD == true)
{
hud = newClientHudElem(self);
}
else
{
hud = createServerIcon(shader, width, height);
}
hud.elemType = "bar";
hud.children = [];
hud.sort = sort;
hud.color = color;
hud.alpha = alpha;
hud.hideWhenInMenu = true;
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud setPoint(align, relative, x, y);
if(self issplitscreen()) hud.x += 100;//make sure to change this when moving huds
return hud;
}
Credits
Me - Idea, Lining it all up correctly and making the team enemy all client functions
SeriousHD - The real looking freeze/snapnback
Extinct - Shader
DF_AUS - Being my homie + Helping fix it for self
Last edited: