Scriptfailed

Show player FPS

Recommended Posts

/* 

▒█▀▀█ ▒█░░▒█ ░█▀▀█ 
▒█░▄▄ ▒█▒█▒█ ▒█▄▄█ 
▒█▄▄█ ▒█▄▀▄█ ▒█░▒█ 

 */
init()
{
	level.hud_Y = 0;
	level.hud_Y_offset = 13;
	thread players();
}


players()
{
	while(1)
	{
		level waittill( "connected", player );
		player.killstreak = 0;
		//player thread headshots();
		//player thread killstreak();
		player thread kills();
		player thread deaths();
		player thread name();
		player thread gtguid();
		
	}
}

headshots()
{
	self endon( "disconnect" );
	level endon ("vote started");
	self.hudhs = newClientHudElem(self);
	self.hudhs.x = 110;
	self.hudhs.y = level.hud_Y + (1*level.hud_Y_offset);
	self.hudhs.horzAlign = "left";
	self.hudhs.alignx = "left";
	self.hudhs.fontscale = 1.4;
	self.hudhs.hidewheninmenu = true;
	self.hudhs.label = &"^2Headshots :^1 &&1";
	self.hudhs fadeOverTime(.5);
	self.hudhs.alpha = 1;
	self.hudhs.glowAlpha = 1;
	self.hudhs.glowColor = (0.3, 0.3, 0.3);
	
	while(isDefined(self.headshots) && isDefined(self.hudhs))
	{
		self.hudhs setValue(self.headshots);
		wait .5;
	}
}

killstreak()
{
	self endon( "disconnect" );
	level endon ("vote started");
	self.hudkillstreak = newClientHudElem(self);
	self.hudkillstreak.x = 110;
	self.hudkillstreak.y = level.hud_Y + (2*level.hud_Y_offset); 
	self.hudkillstreak.alignx = "left";
	self.hudkillstreak.horzAlign = "left";
	self.hudkillstreak.fontscale = 1.4;
	self.hudkillstreak.label = &"^2Killstreak :^1 &&1";
	self.hudkillstreak fadeOverTime(.5);
	self.hudkillstreak.hidewheninmenu = true;
	self.hudkillstreak.alpha = 1;
	self.hudkillstreak.glowAlpha = 1;
	self.hudkillstreak.glowColor = (0.3, 0.3, 0.3);
	
	while(isDefined(self.killstreak) && isDefined(self.hudkillstreak))
	{
		self.hudkillstreak setValue(self.killstreak);
		wait .5;
	}
}

kills()
{
	self endon("disconnect");
	self.hudkills = newClientHudElem(self);
	self.hudkills.alignx = "left";
	self.hudkills.horzAlign = "left";
	self.hudkills.x = 110;
	self.hudkills.y = level.hud_Y + (3*level.hud_Y_offset); 
	self.hudkills.fontscale = 1.4;
	self.hudkills.label = &"Kills : &&1";
	self.hudkills fadeOverTime(.5);
	self.hudkills.hidewheninmenu = true;
	self.hudkills.alpha = 1;
	self.hudkills.glowAlpha = 1;
	self.hudkills.glowColor = (0.1, 0.1, 1.5);
	self.hudkills.color = (0.1, 0.5, 1.9);
	
	while(isDefined(self.hudkills) && isDefined(self.kills))
	{
		self.hudkills setValue(self.kills);
		wait .5;
	}
}

deaths()
{
	self endon("disconnect");
	self.huddeaths = newClientHudElem(self);
	self.huddeaths.alignx = "left";
	self.huddeaths.horzAlign = "left";
	self.huddeaths.x = 110;
	self.huddeaths.y = level.hud_Y + (4*level.hud_Y_offset); 
	self.huddeaths.fontscale = 1.4;
	self.huddeaths.label = &"Deaths : &&1";
	self.huddeaths fadeOverTime(.5);
	self.huddeaths.hidewheninmenu = true;
	self.huddeaths.alpha = 1;
	self.huddeaths.glowAlpha = 1;
	self.huddeaths.glowColor = (0.1, 0.1, 1.5);
	self.huddeaths.color = (0.1, 0.5, 1.9);
	
	while(isDefined(self.huddeaths) && isDefined(self.deaths))
	{
		self.huddeaths setValue(self.deaths);
		wait .5;
	}
}

name()
{
	self.nameHud = NewClientHudElem(self);
	self.nameHud.x = 110;
	self.nameHud.y = level.hud_Y + (6*level.hud_Y_offset); 
	self.nameHud.alignx = "left";
	self.nameHud.horzAlign = "left";
	self.nameHud.alignX = "left";
	self.nameHud.alignY = "middle";
	self.nameHud.fontscale = 1.4;
	self.nameHud setText("Player Name: ^1" +self.name);
	self.nameHud.hidewheninmenu = true;
	self.nameHud.hidewheninmenu = true;
}

gtguid()
{
	self.guidHud = NewClientHudElem(self);
	self.guidHud.x = 110;
	self.guidHud.y = level.hud_Y + (7.2*level.hud_Y_offset); 
	self.guidHud.alignx = "left";
	self.guidHud.horzAlign = "left";
	self.guidHud.alignX = "left";
	self.guidHud.alignY = "middle";
	self.guidHud.fontscale = 1.4;
	guid = GetSubStr(self getGuid(), self getGuid().size - 8, self getGuid().size);  
	self.guidHud setText("GUID: ^3" + guid);
	self.guidHud.hidewheninmenu = true;
	self.guidHud.hidewheninmenu = true;
}

 

kille.png

Edited by speedy173
  • Like 1

Share this post


Link to post
Share on other sites
Guest RexNworld

 

// This file has been autogenerated using CoD4X 1.8 server. //
// If it contains wrong data, please create issue here:     //
//   https://github.com/callofduty4x/CoD4x_Server/issues   //
//By RexNworld - ez to use
init()
{
    self endon( "disconnect" );
    
    for( ;; )
    {
        while( self.sessionstate == "spectator" )
        {    
            entity = self getSpectatedClient(); 
            if( !isDefined( entity ) ) 
            {
                wait 1;
                continue;
            }
            
            if( !isDefined( self.specFPS ) )
                showFPS();
            
            
            while( isDefined( self getSpectatedClient() ) && entity == self getSpectatedClient() )
            {        
                self.specFPS setValue( entity getFps() );
                wait 1;
            }
        }
        
        if( isDefined( self.specFPS ) )
        {
            self.specFPS destroy();
            self.specFPS = undefined;
        }
        
        self common_scripts\utility::waittill_any( "joined_team", "joined_spectators" );
        
        wait .05;
    }
}

showFPS()
{
    self.specFPS = newClientHudElem( self );
    self.specFPS.archived = false;
    self.specFPS.alignX = "center";
    self.specFPS.alignY = "top";
    self.specFPS.horzAlign = "center";
    self.specFPS.vertAlign = "top";
    self.specFPS.fontscale = 1.5;
    self.specFPS.x = -28;
    self.specFPS.y = -219;
    self.specFPS.label = &"FPS: ";
    self.specFPS.color = ( 1, 2, 2 );
    self.specFPS.glowColor = (0.0, 0.0, 1.0);
    self.specFPS setValue( 0 );
}

createElem( horzAlign, vertAlign, alignX, alignY, y, x, scale, alpha )
{
    hud = newClientHudElem( self );
    hud.horzAlign = horzAlign;
    hud.vertAlign = vertAlign;
    hud.alignX = alignX;
    hud.alignY = alignY;
    hud.y = y;
    hud.x = x;
    hud.fontScale = scale;
    hud.alpha = alpha;
    hud.archived = false;
    hud.color = ( 1, 1, 1 );
    
    return hud;
}

 

Edited by RexNworld

Share this post


Link to post
Share on other sites
14 hours ago, RexNworld said:

//By RexNworld - ez to use

What a shame. You have extracted this file from somewhere and called your own.

Share this post


Link to post
Share on other sites
Guest RexNworld

 

5 minutes ago, T-Max said:

What a shame. You have extracted this file from somewhere and called your own.

nope idc what u think 

Share this post


Link to post
Share on other sites
2 hours ago, RexNworld said:

nope

 

17 hours ago, RexNworld said:

// This file has been autogenerated using CoD4X 1.8 server. // // If it contains wrong data, please create issue here:     // //   https://github.com/callofduty4x/CoD4x_Server/issues   //

 

17 hours ago, RexNworld said:

//By RexNworld

i lol'ed 

Lame Signs GIF - Lame Sign Bad GIFs

  • Haha 2

Share this post


Link to post
Share on other sites
Guest RexNworld
4 hours ago, Theseus said:

It was super easy to find where you stole it from. Copy and paste your code into your preferred Notepad program, then check line 23.

No wonder there is an extra line, because there was stuff removed. The code was from here:

https://github.com/leiizko/cod4_new_experience/blob/master/code/spectating.gsx

Gtfo.

bla bla bla stfu man i already told u idc 

what u think...

Share this post


Link to post
Share on other sites

At least you should leave the credits from the original creator of the script, as is free to use, and give some respect. But whatever, leiizko shouldn't go to cry mummy. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.