Post: Help with newsbar GSC code
05-10-2015, 03:51 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Can someone make me or edit a newsbar so it's a black background at the bottom scolling LEFT & the black background is bordered with GREEN? I have a code here but don't know what to change.

    drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = self createFontString(font, fontScale);
else
hud = level createServerFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}

drawShader(shader, x, y, width, height, color, alpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = newClientHudElem(self);
else
hud = newHudElem();
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}

informationBar()
{
level endon("game_ended");

level.infoBarBackground = level drawShader("white", -50, 30, 1000, 35, (0, 0, 0), 0.50, 7, true);
level.infoBarBackground.alignX = "center";
level.infoBarBackground.alignY = "bottom";
level.infoBarBackground.horzAlign = "center";
level.infoBarBackground.vertAlign = "bottom";

level.infoBarText = level drawText("Your Host For Today Is ^5" + level.hostname, "objective", 2, 1000, 26, (1, 1, 1), 1, (0, 0, 0), 0, 10, true);
level.infoBarText.alignX = "center";
level.infoBarText.alignY = "bottom";
level.infoBarText.horzAlign = "center";
level.infoBarText.vertAlign = "bottom";

for (;Winky Winky
{
if (level.infoBarText.x == -1000)
level.infoBarText.x = 1000;
else
{
level.infoBarText MoveOverTime(20);
level.infoBarText.x = -1000;
wait 25;
}
wait 0.05;
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
05-10-2015, 05:03 AM #2
HiddenHour
I defeated!
Originally posted by Elitexboxer View Post
Can someone make me or edit a newsbar so it's a black background at the bottom scolling LEFT & the black background is bordered with GREEN? I have a code here but don't know what to change.

    drawText(text, font, fontScale, x, y, color, alpha, glowColor, glowAlpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = self createFontString(font, fontScale);
else
hud = level createServerFontString(font, fontScale);
hud setText(text);
hud.x = x;
hud.y = y;
hud.color = color;
hud.alpha = alpha;
hud.glowColor = glowColor;
hud.glowAlpha = glowAlpha;
hud.sort = sort;
hud.alpha = alpha;
return hud;
}

drawShader(shader, x, y, width, height, color, alpha, sort, allclients)
{
if (!isDefined(allclients))
allclients = false;

if (!allclients)
hud = newClientHudElem(self);
else
hud = newHudElem();
hud.elemtype = "icon";
hud.color = color;
hud.alpha = alpha;
hud.sort = sort;
hud.children = [];
hud setParent(level.uiParent);
hud setShader(shader, width, height);
hud.x = x;
hud.y = y;
return hud;
}

informationBar()
{
level endon("game_ended");

level.infoBarBackground = level drawShader("white", -50, 30, 1000, 35, (0, 0, 0), 0.50, 7, true);
level.infoBarBackground.alignX = "center";
level.infoBarBackground.alignY = "bottom";
level.infoBarBackground.horzAlign = "center";
level.infoBarBackground.vertAlign = "bottom";

level.infoBarText = level drawText("Your Host For Today Is ^5" + level.hostname, "objective", 2, 1000, 26, (1, 1, 1), 1, (0, 0, 0), 0, 10, true);
level.infoBarText.alignX = "center";
level.infoBarText.alignY = "bottom";
level.infoBarText.horzAlign = "center";
level.infoBarText.vertAlign = "bottom";

for (;Winky Winky
{
if (level.infoBarText.x == -1000)
level.infoBarText.x = 1000;
else
{
level.infoBarText MoveOverTime(20);
level.infoBarText.x = -1000;
wait 25;
}
wait 0.05;
}
}


Just use drawShader. Like level.border = drawShader(put x, y, color, etc here according to the drawShader function)
05-10-2015, 03:09 PM #3
Originally posted by TheHiddenHour View Post
Just use drawShader. Like level.border = drawShader(put x, y, color, etc here according to the drawShader function)


I don't understand I'm new to GSC coding.
05-10-2015, 03:12 PM #4
Originally posted by Elitexboxer View Post
I don't understand I'm new to GSC coding.


Refer to this thread it might help you with your future of gsc coding You must login or register to view this content.
05-10-2015, 05:10 PM #5
Vondy Supreme
< ^ > < ^ >
Originally posted by HooliganMoDz View Post
Refer to this thread it might help you with your future of gsc coding You must login or register to view this content.

Why do you reply if you can't help him... It's obvious the newsbar code isn't in that thread Facepalm
05-10-2015, 06:49 PM #6
Originally posted by EliteGamer01031 View Post
Why do you reply if you can't help him... It's obvious the newsbar code isn't in that thread Facepalm


Yes but it has other codes that he may be after... And also its a very useful thread to look at if your new to gsc coding... Enzo
05-10-2015, 06:52 PM #7
Vondy Supreme
< ^ > < ^ >
Originally posted by HooliganMoDz View Post
Yes but it has other codes that he may be after... And also its a very useful thread to look at if your new to gsc coding... Enzo

You don't need to spam it in every thread... That's a cheap way to get your rep up
05-10-2015, 06:55 PM #8
Originally posted by EliteGamer01031 View Post
You don't need to spam it in every thread... That's a cheap way to get your rep up


Spam it in every thread? I tell or ask people to refer to it as in most instances they find what they are after... May be cheap to some but i dont control who gives me rep do i? So on that note im going to continue to browse the site and not reply anymore so chow... Outie

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo