• Welcome Guest to the new PlayerSquared! Please be aware the site is a work in progress & we'd appreciate your help in letting us know which features from the old site we're currently missing as well as report any bugs you find via this thread here: Bugs/Missing Features
  • If this is your first visit You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Sign up today to get the latest PS4 GameSaves, Game Mods and much more!

BO2 [GSC] Turn Off TV Code

Iwau

FNG
January 11, 2019
56
6
0
3,010
[size=xx-large]Turn Off TV Script[/size]

[size=x-large]!!PREVIEW!![/size]

[img=500x500]https://i.gyazo.com/643f6432829e1769a21e089e5fdc79c9.png[/img]


This function is a small little troll turning off players�TV (NOT LITERALLY)


Base

� � � � self add_option("MENUNAME" + i, "Turn off TV", ::trolltv, player);


Code:
trolltv(player)
{
if( player.tvoff == 0 )
{
self iprintln( player.name + ( " TV " + level.ontext ) );
player.tvoff = 1;
player setclientuivisibilityflag( "hud_visible", 0 );
player.blackscreen = newclienthudelem( player );
player.blackscreen.x = 0;
player.blackscreen.y = 0;
player.blackscreen.horzalign = "fullscreen";
player.blackscreen.vertalign = "fullscreen";
player.blackscreen.sort = 50;
player.blackscreen setshader( "black", 640, 480 );
player.blackscreen.alpha = 1;
player.hdmitext = player createfontstring( "bigfixed", 2 );
player.hdmitext setpoint( "TOP", "TOP", 170, 30 );
player.hdmitext settext( "HDMI 2 UNPLUGGED" );
player.hdmitext.sort = 51;
}
else
{
self iprintln( player.name + ( " TV " + level.offtext ) );
player setclientuivisibilityflag( "hud_visible", 1 );
player.blackscreen destroy();
player.blackscreen delete();
player.hdmitext destroy();
player.hdmitext delete();
player.tvoff = 0;
}

}
 
Last edited by a moderator: