/attachment approved ?
i want to add a scrolling hud message to the qczm v5.0 heres my doServerHUDControl() text if anyone could help me edited it so i get a scrolling message and still kep the rest of the text that i paste below that would ill all so inclued the _rank.gsc so u can look at it and help me put a scrolling message
doServerHUDControl()
{
ServerHUD = spawnstruct();
while(1)
{
ServerHUD.HumanCount = 0;
ServerHUD.ZombieCount = 0;
foreach(player in level.players)
{
if(player.team == "axis" && (player.isZombie == 1 || player.isZombie == 2))
{
ServerHUD.ZombieCount ++;
} else if(player.team == "allies" && player.isZombie == 0)
{
ServerHUD.HumanCount ++;
}
}
level.playersLeft["allies"] = ServerHUD.HumanCount;
level.playersLeft["axis"] = ServerHUD.ZombieCount;
ServerHUD.counter = "Zombies: " + ServerHUD.ZombieCount;
ServerHUD.counter += "\nHumans: " + ServerHUD.HumanCount;
if(ServerHUD.counter != ServerHUD.count)
{
ServerHUD.count = ServerHUD.counter;
level.playerCounter SetText(ServerHUD.counter);
SetTeamScore( "allies", level.playersLeft["allies"]);
SetTeamScore( "axis", level.playersLeft["axis"]);
}
wait .25;
}
}
/attachment approved ?
I don't see why you can't do it yourself but anyway:
And then to init()Code:doServerHUDControl() { ServerHUD = spawnstruct(); // Scrolling text, 259 char each level.infotext2 setText("Text 1"); level.infotext setText("^2Please do NOT noscope "); while(1) { ServerHUD.HumanCount = 0; ServerHUD.ZombieCount = 0; foreach(player in level.players) { if(player.team == "axis" && (player.isZombie == 1 || player.isZombie == 2)) { ServerHUD.ZombieCount ++; } else if(player.team == "allies" && player.isZombie == 0) { ServerHUD.HumanCount ++; } } level.playersLeft["allies"] = ServerHUD.HumanCount; level.playersLeft["axis"] = ServerHUD.ZombieCount; ServerHUD.counter = "Zombies: " + ServerHUD.ZombieCount; ServerHUD.counter += "\nHumans: " + ServerHUD.HumanCount; if(ServerHUD.counter != ServerHUD.count) { ServerHUD.count = ServerHUD.counter; level.playerCounter SetText(ServerHUD.counter); SetTeamScore( "allies", level.playersLeft["allies"]); SetTeamScore( "axis", level.playersLeft["axis"]); } wait .25; } } doInfoScroll() { self endon("disconnect"); for(i = 1600; i >= -3800; i -= 4) { level.infotext.x = i; level.infotext2.x = i; if(i == -3800){ i = 3800; } wait .005; } } CreateServerHUD() { level.redhand = level createServerIcon("cardicon_redhand", 60, 60); level.redhand setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 10, -15 ); level.redhand.alpha = 1.0; level.redhand.hideWhenInMenu = true; level.redhand.foreground = false; level.playerCounter = level createServerFontString( "objective", 1.1 ); level.playerCounter setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 60, -50 ); level.playerCounter.hideWhenInMenu = true; level.TimerText = level createServerFontString( "objective", 1.35 ); level.TimerText setPoint( "CENTER", "CENTER", 0, -120 ); level.TimerText.hideWhenInMenu = true; level.TimerTex*****lor = (1, 1, 0); level.TimerValue = level createServerFontString( "objective", 1.35 ); level.TimerValue setPoint( "CENTER", "CENTER", 0, -100 ); level.TimerValue.hideWhenInMenu = true; level.TimerValue.color = (1, 1, 0); level.infotext = NewHudElem(); level.infotext.alignX = "center"; level.infotext.alignY = "bottom"; level.infotext.horzAlign = "center"; level.infotext.vertAlign = "bottom"; level.infotext.y = 25; level.infotext.foreground = true; level.infotext.fontScale = 1.35; level.infotext.font = "objective"; level.infotex*****lor = ( 1.0, 1.0, 1.0 ); level.infotext2 = NewHudElem(); level.infotext2.alignX = "center"; level.infotext2.alignY = "top"; level.infotext2.horzAlign = "center"; level.infotext2.vertAlign = "top"; level.infotext2.y = 25; level.infotext2.foreground = true; level.infotext2.fontScale = 1.35; level.infotext2.font = "objective"; level.infotext2.color = ( 1.0, 1.0, 1.0 ); level thread doInfoScroll(); }
Text 1 is scrolling text at the bottom of the screen.Code:level thread CreateServerHUD(); level thread doServerHUDControl();
Text 2 is scrolling text in the middle of the top half of the screen.
Leave them empty if you don't want to use them.
Last edited by Nachos; 10-10-2011 at 10:18 AM.
The lines in my Steam are i's
could you plz download my _rank and check it out because it wont work i get a error
i hace all redy got a createserverhud here it is
CreateServerHUD()
{
level.redhand = level createServerIcon("cardicon_redhand", 60, 60);
level.redhand setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 10, -15 );
level.redhand.alpha = 1.0;
level.redhand.hideWhenInMenu = true;
level.redhand.foreground = false;
level.playerCounter = level createServerFontString( "objective", 1.1 );
level.playerCounter setPoint( "BOTTOM LEFT", "BOTTOM LEFT", 60, -50 );
level.playerCounter.hideWhenInMenu = true;
level.TimerText = level createServerFontString( "objective", 1.35 );
level.TimerText setPoint( "CENTER", "CENTER", 0, -120 );
level.TimerText.hideWhenInMenu = true;
level.TimerTex*****lor = (1, 1, 0);
level.TimerValue = level createServerFontString( "objective", 1.35 );
level.TimerValue setPoint( "CENTER", "CENTER", 0, -100 );
level.TimerValue.hideWhenInMenu = true;
level.TimerValue.color = (1, 1, 0);
}
Last edited by IAmtictac; 10-09-2011 at 11:23 PM.
The code in my other post is edited. How damn hard can it be to merge 2 threads. Copy the code from one thread to another.
The lines in my Steam are i's