Post: [RELEASE] Black ops News bar
02-23-2011, 11:23 PM #1
|C++|
< ^ > < ^ >
(adsbygoogle = window.adsbygoogle || []).push({});


Credit
NITRAM for this beast ass code

So this is the code explained to get that scrolling news bar displayed in the video above^^

This function creates the Background

    Create_Newsbar( Shader, Align, Alpha, Color, Speed ) 

//Example's ,
level thread Create_Newsbar(); // You don't have to define any option's for it to work there are defaults.
level thread Create_Newsbar( undefined, "BOTTOM", 50, ( 180, 0, 0 ) );


This function is for the news text
    Set_Newsbartext( Text, Font, FontScale, Color, GColor, GAlpha )

//Example's ,
level thread Set_Newsbartext( "Welcome To ^4NITRAM's ^7Modified Warfare" ); // Now with this you can if you wont just define the text.
level thread Set_Newsbartext( "Welcome To ^4NITRAM's ^7Modified Warfare", "BIGFIXED", 1, ( 180, 0, 180 ), ( 180, 180, 0 ), 50 );



This function is for if you what to update the news text an example you just Kick/Verified someone, to use this you would just call it up anytime you want NewText is for what you want to update the text to and KeepOld is if you what it to display the old message again after to update.
    Update_Newsbar( NewText, KeepOld )

//Example's ,
level thread Update_Newsbar( "Welcome To ^4NITRAM's ^7Modified Warfare ^1only 30 minutes left!" ); // Won't keep the old message
level thread Update_Newsbar( player.name + " Has been kicked by " + self.name, true );

Here's the actual code
    Create_Newsbar( Shader, Align, Alpha, Color, Speed )
{
News = spawnStruct();
News.Text = newHudElem();
News.Text.alignX = "CENTER";
News.Text.horzAlign = "CENTER";
News.Text.foreGround = true;
News.Text.hideWhenInMenu = true;
News.Text.Glow = 1;
News.Text.Sort = 2;
News.Shader = newHudElem();
News.Shader.horzAlign = "CENTER";
News.Shader.alignX = "CENTER";
News.Shader.foreGround = FALSE;
News.Shader.hideWhenInMenu = TRUE;
News.Shader.Sort = 1;
News.Speed = 60;
if( isDefined( Speed ) ) News.Speed = Speed;
if( isDefined( Align ) )
{
News.Text.alignY = Align;
News.Text.vertAlign = Align;
News.Shader.alignY = Align;
News.Shader.vertAlign = Align;
}
else
{
News.Text.alignY = "TOP";
News.Text.vertAlign = "TOP";
News.Shader.alignY = "TOP";
News.Shader.vertAlign = "TOP";
}
if( isDefined( Alpha ) ) News.Shader.Alpha = Alpha;
else News.Shader.Alpha = 0.75;
if( ( !isDefined( Color ) ) && ( !isDefined( Shader ) ) ) Shader = "BLACK";
if( isDefined( Shader ) ) News.Shader setShader( Shader, 0, 25 );
if( ( isDefined( Color ) ) && ( !isDefined( Shader ) ) )
{
News.Shader.Color = Color;
News.Shader setShader( "WHITE", 0, 25 );

}
News.Shader scaleOverTime( 7, 880, 25 );
wait 7;
level notify( "Created_Newsbar", News );
wait ( 0.05 );
}

Set_Newsbartext( Text, Font, FontScale, Color, GColor, GAlpha )
{
level waittill( "Created_Newsbar", News );
News.Message = Text;
if( isDefined( Font ) ) News.Text.Font = Font;
else News.Text.Font = "BIGFIXED";
if( isDefined( FontScale ) ) News.Text.FontScale = FontScale;
else News.Text.FontScale = 1;
if( isDefined( Color ) ) News.Text.Color = ( Color[0], Color[1], Color[2] );
if( isDefined( GColor ) ) News.Text.GlowColor = ( GColor[0]/255, GColor[1]/255, GColor[2]/255 );
if( isDefined( GAlpha ) ) News.Text.GlowAlpha = GAlpha;
if( isDefined( Text ) ) News.Text setText( Text );
else News.Text setText( "define your text dip****" );
News.Text.x += ( Text.size + 870 ) * 1.45;
News.TextSize = Text.size;
for( ;; )
{
wait ( 0.05 );
News.Text moveOverTime( ( ( News.TextSize + 870 ) / News.Speed ) );
News.Text.x -= ( News.TextSize + 870 ) * 2.9;
wait ( ( News.TextSize + 870 ) / News.Speed ) - 0.05;
News.Text.x += ( News.TextSize + 870 ) * 2.9;
level notify ( "Done_Message", News );
}
}

Update_Newsbar( NewText, KeepOld )
{
self endon( "Done_Update" );
level waittill( "Done_Message", News );
News.OldMessage = News.Message;
News.OldTextSize = News.TextSize;
News.OldSpeed = News.Speed;
News.Text setText( "^1News Update : ^7" + NewText );
News.TextSize = NewText.size;
News.Speed = 100;
level waittill( "Done_Message" );
News.Speed = News.OldSpeed;
if( isDefined( KeepOld ) && KeepOld )
{
News.Text setText( News.OldMessage );
News.TextSize = News.OldTextSize;
}
else
{
News.Text setText( NewText );
News.TextSize = NewText.size;
}
level notify( "Done_Update" );
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following user thanked |C++| for this useful post:

bles590
02-23-2011, 11:35 PM #2
WOW Thats siik.... should be able to use that online xD

---------- Post added at 06:35 PM ---------- Previous post was at 06:33 PM ----------

Lmaoaotf @ orgasm xdddd
02-23-2011, 11:36 PM #3
|C++|
< ^ > < ^ >
Originally posted by MaDnEsS View Post
WOW Thats siik.... should be able to use that online xD


yea, it wold be nice if you would thank the useful post and rep me for my hard work :love:
and you can get online with it :love:

The following user thanked |C++| for this useful post:

bles590
02-23-2011, 11:54 PM #4
Traxx
Banned
thanks for this man
02-23-2011, 11:57 PM #5
|C++|
< ^ > < ^ >
Originally posted by Traxx View Post
thanks for this man


your welcome, you pay your gratitude with a little rep and thank the useful post Smile
02-24-2011, 12:25 AM #6
the orgasm made me roflcopter

---------- Post added at 07:25 PM ---------- Previous post was at 07:20 PM ----------

Originally posted by SLiiTH3R View Post
yea, it wold be nice if you would thank the useful post and rep me for my hard work :love:
and you can get online with it :love:


so i should +rep you for copy n pasting ?
02-24-2011, 12:27 AM #7
|C++|
< ^ > < ^ >
Originally posted by .
the orgasm made me roflcopter


if you liked it that much you should rep me and thank the post :embarrassed:

---------- Post added at 07:27 PM ---------- Previous post was at 07:25 PM ----------

Originally posted by .
the orgasm made me roflcopter

---------- Post added at 07:25 PM ---------- Previous post was at 07:20 PM ----------



so i should +rep you for copy n pasting ?


Its not all copied just the code, plus it was more of a news report.
02-24-2011, 05:36 AM #8
DiJiTaLNiCk
BaLLiN' STaTuS
Originally posted by SLiiTH3R View Post
You must login or register to view this content.

Credit
NITRAM for this beast ass code

So this is the code explained to get that scrolling news bar displayed in the video above^^

This function creates the Background

    Create_Newsbar( Shader, Align, Alpha, Color, Speed ) 

//Example's ,
level thread Create_Newsbar(); // You don't have to define any option's for it to work there are defaults.
level thread Create_Newsbar( undefined, "BOTTOM", 50, ( 180, 0, 0 ) );


This function is for the news text
    Set_Newsbartext( Text, Font, FontScale, Color, GColor, GAlpha )

//Example's ,
level thread Set_Newsbartext( "Welcome To ^4NITRAM's ^7Modified Warfare" ); // Now with this you can if you wont just define the text.
level thread Set_Newsbartext( "Welcome To ^4NITRAM's ^7Modified Warfare", "BIGFIXED", 1, ( 180, 0, 180 ), ( 180, 180, 0 ), 50 );



This function is for if you what to update the news text an example you just Kick/Verified someone, to use this you would just call it up anytime you want NewText is for what you want to update the text to and KeepOld is if you what it to display the old message again after to update.
    Update_Newsbar( NewText, KeepOld )

//Example's ,
level thread Update_Newsbar( "Welcome To ^4NITRAM's ^7Modified Warfare ^1only 30 minutes left!" ); // Won't keep the old message
level thread Update_Newsbar( player.name + " Has been kicked by " + self.name, true );

Here's the actual code
    Create_Newsbar( Shader, Align, Alpha, Color, Speed )
{
News = spawnStruct();
News.Text = newHudElem();
News.Text.alignX = "CENTER";
News.Text.horzAlign = "CENTER";
News.Text.foreGround = true;
News.Text.hideWhenInMenu = true;
News.Text.Glow = 1;
News.Text.Sort = 2;
News.Shader = newHudElem();
News.Shader.horzAlign = "CENTER";
News.Shader.alignX = "CENTER";
News.Shader.foreGround = FALSE;
News.Shader.hideWhenInMenu = TRUE;
News.Shader.Sort = 1;
News.Speed = 60;
if( isDefined( Speed ) ) News.Speed = Speed;
if( isDefined( Align ) )
{
News.Text.alignY = Align;
News.Text.vertAlign = Align;
News.Shader.alignY = Align;
News.Shader.vertAlign = Align;
}
else
{
News.Text.alignY = "TOP";
News.Text.vertAlign = "TOP";
News.Shader.alignY = "TOP";
News.Shader.vertAlign = "TOP";
}
if( isDefined( Alpha ) ) News.Shader.Alpha = Alpha;
else News.Shader.Alpha = 0.75;
if( ( !isDefined( Color ) ) && ( !isDefined( Shader ) ) ) Shader = "BLACK";
if( isDefined( Shader ) ) News.Shader setShader( Shader, 0, 25 );
if( ( isDefined( Color ) ) && ( !isDefined( Shader ) ) )
{
News.Shader.Color = Color;
News.Shader setShader( "WHITE", 0, 25 );

}
News.Shader scaleOverTime( 7, 880, 25 );
wait 7;
level notify( "Created_Newsbar", News );
wait ( 0.05 );
}

Set_Newsbartext( Text, Font, FontScale, Color, GColor, GAlpha )
{
level waittill( "Created_Newsbar", News );
News.Message = Text;
if( isDefined( Font ) ) News.Text.Font = Font;
else News.Text.Font = "BIGFIXED";
if( isDefined( FontScale ) ) News.Text.FontScale = FontScale;
else News.Text.FontScale = 1;
if( isDefined( Color ) ) News.Text.Color = ( Color[0], Color[1], Color[2] );
if( isDefined( GColor ) ) News.Text.GlowColor = ( GColor[0]/255, GColor[1]/255, GColor[2]/255 );
if( isDefined( GAlpha ) ) News.Text.GlowAlpha = GAlpha;
if( isDefined( Text ) ) News.Text setText( Text );
else News.Text setText( "define your text dip****" );
News.Text.x += ( Text.size + 870 ) * 1.45;
News.TextSize = Text.size;
for( ;; )
{
wait ( 0.05 );
News.Text moveOverTime( ( ( News.TextSize + 870 ) / News.Speed ) );
News.Text.x -= ( News.TextSize + 870 ) * 2.9;
wait ( ( News.TextSize + 870 ) / News.Speed ) - 0.05;
News.Text.x += ( News.TextSize + 870 ) * 2.9;
level notify ( "Done_Message", News );
}
}

Update_Newsbar( NewText, KeepOld )
{
self endon( "Done_Update" );
level waittill( "Done_Message", News );
News.OldMessage = News.Message;
News.OldTextSize = News.TextSize;
News.OldSpeed = News.Speed;
News.Text setText( "^1News Update : ^7" + NewText );
News.TextSize = NewText.size;
News.Speed = 100;
level waittill( "Done_Message" );
News.Speed = News.OldSpeed;
if( isDefined( KeepOld ) && KeepOld )
{
News.Text setText( News.OldMessage );
News.TextSize = News.OldTextSize;
}
else
{
News.Text setText( NewText );
News.TextSize = NewText.size;
}
level notify( "Done_Update" );
}


nice one idiot. already posted.

---------- Post added at 12:24 AM ---------- Previous post was at 12:23 AM ----------

ohh and if u ask for +rep one more time. imma -REP you so hard u will be asking for -REP.

The following 4 users say thank you to DiJiTaLNiCk for this useful post:

Dennfoxjames, Dope., MW3Glitchers, samb222
02-24-2011, 02:11 PM #9
CHAOZ
Banned
Originally posted by niccrx View Post
nice one idiot. already posted.

---------- Post added at 12:24 AM ---------- Previous post was at 12:23 AM ----------

ohh and if u ask for +rep one more time. imma -REP you so hard u will be asking for -REP.


No orly now?

The following user thanked CHAOZ for this useful post:

|C++|
02-24-2011, 10:31 PM #10
noodles88
Bounty hunter
lmao at -rep jibe desrves him right

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo