Post: Help with gsc hud text
04-19-2016, 01:17 AM #1
(adsbygoogle = window.adsbygoogle || []).push({});
Hi, I am creating a game mode and I would like to know what the code gsc a HUD text, I want to stay the whole game and not get it
Thanks everyone Happy
(adsbygoogle = window.adsbygoogle || []).push({});
04-19-2016, 02:41 AM #2
HiddenHour
I defeated!
Originally posted by moroxeko View Post
Hi, I am creating a game mode and I would like to know what the code gsc a HUD text, I want to stay the whole game and not get it
Thanks everyone Happy


Bruh what Wtf
04-19-2016, 09:48 AM #3
Originally posted by TheHiddenHour View Post
Bruh what Wtf

I would like to know what the GSC code of a HUD text.
04-19-2016, 10:29 AM #4
Patrick
League Champion
This is sparta! Sorry but you have no chance in making a gamemode if you dont know how to do the very basics, even ions knows how to do this, i dunno about the "gime code" guy tho Happy

The following 3 users say thank you to Patrick for this useful post:

HiddenHour, Nate͍, ODLeslie
04-19-2016, 02:35 PM #5
but not how to make it work this because I freezes the console

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

for(;Winky Winky
{
if(level.huds_Terrorist getHUDInfo("text 1") != "^1" + level.terrorist.name + "^7\n^5Survivors())
}
04-19-2016, 04:10 PM #6
DF_AUS
NextGenUpdate Elite
Originally posted by moroxeko View Post
but not how to make it work this because I freezes the console

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

for(;Winky Winky
{
if(level.huds_Terrorist getHUDInfo("text 1") != "^1" + level.terrorist.name + "^7\n^5Survivors())
}


Not that it will help much but the reason your console froze is you have no wait time in the loop boi Smile
04-20-2016, 03:56 AM #7
HiddenHour
I defeated!
Originally posted by moroxeko View Post
but not how to make it work this because I freezes the console

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

for(;Winky Winky
{
if(level.huds_Terrorist getHUDInfo("text 1") != "^1" + level.terrorist.name + "^7\n^5Survivors())
}


So you're using the HUD functions from my gamemodes huh tears

You need to have the drawString, setString, and getHUDInfo functions.
    /*
drawString(type, text, disableOverflowCount, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, sort, client, team)
drawShader(shader, width, height, x, y, xa, ya, color, alpha, sort, client, team)
drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, sort, client, team, selected)
setString(type, text, disableOverflowCount)
getHUDInfo(arg)
*/

drawString(type, text, disableOverflowCount, scale, color, alpha, glowcolor, glowalpha, x, y, xa, ya, sort, client, team)
{
if(!client || !isDefined(client))
hud = self createFontString("objective", scale);
else
hud = level createServerFontString("objective", scale, team);
hud.sort = sort;
hud setString(type, text, disableOverflowCount);
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
hud.glowcolor = glowcolor;
hud.glowalpha = glowalpha;
hud.isTextElem = true;
hud.archived = false;
return hud;
}

drawShader(shader, width, height, x, y, xa, ya, color, alpha, sort, client, team)
{
if(!client || !isDefined(client))
hud = createIcon(shader, width, height);
else
hud = createServerIcon(shader, width, height, team);
hud.width = width;
hud.height = height;
hud.sort = sort;
hud setPoint(xa, ya, x, y);
hud.color = color;
hud.alpha = alpha;
hud.isTextElem = false;
return hud;
}

drawBar(width, height, color, alpha, flashfrac, x, y, xa, ya, sort, client, team, selected)
{
if(!client || !isDefined(client))
hud = createBar(color, width, height, flashfrac);
else
hud = createServerBar(color, width, height, flashfrac, team, selected);
hud.sort = sort;
hud setPoint(xa, ya, x, y);
hud updateBar((flashfrac));
hud.alpha = alpha;
hud.isTextElem = false;
return hud;
}

setString(type, text, disableOverflowCount)
{
if(!disableOverflowCount)
{
if(!isDefined(level.overflowfix_result))
level.overflowfix_result = 0;
else
level.overflowfix_result += 1;

level notify("overflow_result");
}

self.text = text;
if(type==1)
self setText(text);
else if(type==2)
self setValue(text);
else if(type==3)
self setTimer(text);
else if(type==4)
self setTenthsTimer(text);
}

getHUDInfo(arg)
{
if(arg=="color")
return self.color;
else if(arg=="alpha")
return self.alpha;
else if(arg=="x")
return self.x;
else if(arg=="y")
return self.y;
else if(arg=="text")
return self.text;
else if(arg=="sort")
return self.sort;
else if(arg=="width")
return self.width;
else if(arg=="height")
return self.height;
}


Replace desired_hud with the hud element you want to monitor. Change the_text_you_want to what you want to text to be checked.
    monitorHUDText()
{
level endon("game_ended");

for(;Winky Winky
{
if(desired_hud getHUDInfo("text") != the_text_you_want)
{
//do stuff
}
wait 0.01;
}
}
04-20-2016, 03:57 AM #8
HiddenHour
I defeated!
Originally posted by 32085
This is sparta! Sorry but you have no chance in making a gamemode if you dont know how to do the very basics, even ions knows how to do this, i dunno about the "gime code" guy tho Happy


Hey, maybe we can get some more of them "Russian Roulette" gamemodes :troll:

The following user thanked HiddenHour for this useful post:

Patrick
04-20-2016, 05:58 AM #9
Nate͍
Do a barrel roll!
Originally posted by TheHiddenHour View Post
Hey, maybe we can get some more of them "Russian Roulette" gamemodes :troll:


:( Lmao I will make a better one rn
04-20-2016, 10:02 AM #10
Patrick
League Champion
Originally posted by TheHiddenHour View Post
Hey, maybe we can get some more of them "Russian Roulette" gamemodes :troll:


Yeah maybe he can make it within 15 minutes since he is new to gsc :O, since obviously i loved that gamemode Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo