Post: [RELEASE] DISPLAY HEALTH ON SCREEN Code
02-16-2011, 10:03 PM #1
Dreamcather
Call me Eddie Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({}); This Display your health on screen.

    
health_hud()
{

self endon( "disconnect" );

x = 80;
y = 40;

self.health_bar = NewClientHudElem( self );
self.health_bar.x = x + 80;
self.health_bar.y = y + 2;
self.health_bar.alignX = "left";
self.health_bar.alignY = "top";
self.health_bar.horzAlign = "fullscreen";
self.health_bar.vertAlign = "fullscreen";
self.health_bar.alpha = 1;
self.health_bar.foreground = 1;
self.health_bar setshader( "black", 1, 8 );

self.health_text = NewClientHudElem( self );
self.health_text.x = x + 80;
self.health_text.y = y;
self.health_text.alignX = "left";
self.health_text.alignY = "top";
self.health_text.horzAlign = "fullscreen";
self.health_text.vertAlign = "fullscreen";
self.health_text.alpha = 1;
self.health_text.fontScale = 1;
self.health_text.foreground = 1;

for ( ;; )
{
wait ( 0.05 );

width = self.health / self.maxhealth * 300;
width = int( max( width, 1 ) );
self.health_bar setShader( "black", width, 8 );

self.health_text SetValue( self.health );
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

The following 7 users say thank you to Dreamcather for this useful post:

Ada Wong, BuC-ShoTz, Fifa97, maxrox, wfghackz, xELiT3_Sn1PaXx, xNiicademus
02-16-2011, 10:04 PM #2
Fifa97
Maggbot timeout!
Originally posted by Playstation3lb View Post
    

health_hud()
{

********self*endon(*"disconnect"*);
********
********x*=*80;
********y*=*40;

********self.health_bar*=*NewClientHudElem(*self*);
********self.health_bar.x*=*x*+*80;
********self.health_bar.y*=*y*+*2;
********self.health_bar.alignX*=*"left";
********self.health_bar.alignY*=*"top";
********self.health_bar.horzAlign*=*"fullscreen";
********self.health_bar.vertAlign*=*"fullscreen";
********self.health_bar.alpha*=*1;
********self.health_bar.foreground*=*1;
********self.health_bar*setshader(*"black",*1,*8*);

********self.health_text*=*NewClientHudElem(*self*);
********self.health_text.x*=*x*+*80;
********self.health_text.y*=*y;
********self.health_text.alignX*=*"left";
********self.health_text.alignY*=*"top";
********self.health_text.horzAlign*=*"fullscreen";
********self.health_text.vertAlign*=*"fullscreen";
********self.health_text.alpha*=*1;
********self.health_text.fontScale*=*1;
********self.health_text.foreground*=*1;
********
********for*(*;;*)
********{
****************wait*(*0.05*);

****************width*=*self.health*/*self.maxhealth***300;
****************width*=*int(*max(*width,*1*)*);
****************self.health_bar*setShader(*"black",*width,*8*);

****************self.health_text*SetValue(*self.health*);
********}
}*


thanks. can be used in gamemodes. really useful
02-16-2011, 10:07 PM #3
divybc
Former Staff
Who made this code, Im sure it's in zombieland.

The following user thanked divybc for this useful post:

02-16-2011, 10:09 PM #4
Dreamcather
Call me Eddie Winky Winky
Originally posted by oIDivybc
Who made this code, Im sure it's in zombieland.


I really Dont Know.
02-16-2011, 10:17 PM #5
Where about's would you place this???
02-17-2011, 04:16 AM #6
hdc89
Banned
Originally posted by wfghackz View Post
Where about's would you place this???


In The Patch? Well I Would Put It in PlayerSpawn And Put Code in Some GSC with RoomWinky Winky
02-17-2011, 04:33 AM #7
Demmonnixx
Vault dweller
Originally posted by wfghackz View Post
Where about's would you place this???


Tot the dude ^^^Or in any GSC and just call it from one of the menus (VIP, ACCOUNT, INFECTIONS etc...)


Playstation3lb - It does not go away on death, have to restart for it to go away. Not really what I was thinking when looking at it but still kind of cool. Thanks for sharing bro
02-17-2011, 05:26 AM #8
Default Avatar
Sync
Guest
thanks for the code. :y:
02-17-2011, 06:02 AM #9
Janiboy
☆ janiboy95 ☆
You test it? How big is the "ad" with the health and in witch area of the display will it show up?
02-17-2011, 06:07 AM #10
Dreamcather
Call me Eddie Winky Winky
Originally posted by Janiboy View Post
You test it? How big is the "ad" with the health and in witch area of the display will it show up?


Yupp and it works. It show at the top , And the ad are not so big

The following user thanked Dreamcather for this useful post:

Janiboy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo