Raised This Month: $51 Target: $400
 12% 

Health Display by Exolent


Post New Thread Reply   
 
Thread Tools Display Modes
RedNinja
Junior Member
Join Date: Jul 2008
Old 10-10-2008 , 00:12   Re: Health Display by Exolent
Reply With Quote #41

cheers =D.
atm im using a HUD customizer, so i took away the normal cs health thing, any way i could align your hp plugin to where the old cs hp counter used to be?
it also seems to interfere with Jump bug stats.
__________________
CS 1.6 Kreedz Jumping For Life!

Last edited by RedNinja; 10-10-2008 at 04:50. Reason: adding info
RedNinja is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 03-03-2010 , 19:29   Re: Health Display by Exolent
Reply With Quote #42

something like this for armor???
OvidiuS is offline
Send a message via Skype™ to OvidiuS
cs1.7
Senior Member
Join Date: Oct 2008
Old 03-18-2010 , 01:34   Re: Health Display by Exolent
Reply With Quote #43

Could someone post a version that :

  • only displays health if health is over 255? (hp > 255)
  • the health hud in above the regular cs health display (left side of screen, not in the middle of the screen)
__________________
_____________
/_____\
[° ||| °]
./..............\▓
cs1.7 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-18-2010 , 01:47   Re: Health Display by Exolent
Reply With Quote #44

Try this:
PHP Code:
#include <amxmodx>
#include <amxmisc>


#define PLUGIN_NAME    "Health Display"
#define PLUGIN_VERSION    "11.1"
#define PLUGIN_AUTHOR    "Exolent"


#pragma semicolon 1


new bool:g_player_didnt_spawn[33];

new 
health_on;
new 
health_time;
new 
health_color;
new 
health_custom;
new 
health_effects;
new 
health_always;

public 
plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
register_cvar("health_display"PLUGIN_VERSIONFCVAR_SPONLY);
    
    
register_clcmd("say /health""CmdHealth");
    
register_clcmd("say_team /health""CmdHealth");
    
register_clcmd("fullupdate""CmdFullupdate");
    
    
register_event("Health""EventHealth""be""1>0");
    
register_event("ResetHUD""EventResetHud""be");
    
register_event("TextMsg""EventRestartAttempt""a""2&#Game_w");
    
register_event("DeathMsg""EventDeathMsg""a");
    
    
health_on register_cvar("health_on""1");
    
health_time register_cvar("health_time""12");
    
health_color register_cvar("health_color""1");
    
health_custom register_cvar("health_custom""255 255 0");
    
health_effects register_cvar("health_effects""1");
    
health_always register_cvar("health_always""0");
}

public 
client_disconnect(client)
{
    
remove_task(client);
}

public 
CmdHealth(client)
{
    if( !
get_pcvar_num(health_on) )
    {
        
client_print(clientprint_chat"Health Display is currently off.");
    }
    else if( 
is_user_alive(client) )
    {
        
ShowHealth(client);
    }
    
    return 
PLUGIN_HANDLED;
}

public 
CmdFullupdate(client)
{
    return 
PLUGIN_HANDLED_MAIN;
}

public 
EventHealth(client)
{
    if( 
get_pcvar_num(health_on) )
    {
        
ShowHealth(client);
    }
}

public 
EventResetHud(client)
{
    if( 
g_player_didnt_spawn[client] )
    {
        
g_player_didnt_spawn[client] = false;
    }
    else if( 
is_user_alive(client) && get_pcvar_num(health_always) )
    {
        
set_task(0.1"ShowHealth"client);
    }
}

public 
EventRestartAttempt()
{
    new 
players[32], pnum;
    
get_players(playerspnum"a");
    
    for( new 
0pnumi++ )
    {
        
g_player_didnt_spawn[players[i]] = true;
    }
}

public 
EventDeathMsg()
{
    new 
client read_data(2);
    
    
remove_task(client);
    
    
set_hudmessage(__________3);
    
show_hudmessage(client"");
}

public 
ShowHealth(client)
{
    
remove_task(client);
    
    new 
Float:hud_time get_pcvar_float(health_time);
    
    new 
health get_user_health(client);
    
    if( 
health 255 )
    {
        new 
hud_redhud_greenhud_blue;
        switch( 
get_pcvar_num(health_color) )
        {
            case 
0:
            {
                
hud_red 255;
                
hud_green 255;
                
hud_blue 255;
            }
            case 
1:
            {
                new 
color[16], red[4], green[4], blue[4];
                
get_pcvar_string(health_customcolor15);
                
parse(colorred3green3blue3);
                
                
hud_red str_to_num(red);
                
hud_green str_to_num(green);
                
hud_blue str_to_num(blue);
            }
            case 
2:
            {
                
hud_red random(256);
                
hud_green random(256);
                
hud_blue random(256);
            }
        }
        
        
set_hudmessage(hud_redhud_greenhud_blue0.010.9get_pcvar_num(health_effects), hud_timehud_time0.10.23);
        
show_hudmessage(client"Health: %i"health);
    }
    
    if( 
get_pcvar_num(health_always) )
    {
        
set_task(hud_time 0.1"ShowHealth"client);
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
cs1.7
Senior Member
Join Date: Oct 2008
Old 03-20-2010 , 04:41   Re: Health Display by Exolent
Reply With Quote #45

It works perfect! Thanks!

The golden hud glitter effect looks phenomenal!
__________________
_____________
/_____\
[° ||| °]
./..............\▓
cs1.7 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 07-10-2011 , 23:47   Re: Health Display by Exolent
Reply With Quote #46

Nice Plugin. Can you make it show for CT only?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 07-10-2011 at 23:50.
wickedd is offline
nisam_ja
BANNED
Join Date: Sep 2008
Location: osijek
Old 07-11-2011 , 03:08   Re: Health Display by Exolent
Reply With Quote #47

good plugin as always.

exolent i know you like my videos so this is 4 you

http://www.youtube.com/watch?v=eHnGwDy2y6s

Exolent, i know you can dance.
nisam_ja is offline
Send a message via MSN to nisam_ja Send a message via Skype™ to nisam_ja
neutron
Member
Join Date: Jul 2011
Location: Turkey
Old 07-12-2011 , 10:45   Re: Health Display by Exolent
Reply With Quote #48

thanks forp plug-in
neutron is offline
Send a message via Skype™ to neutron
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode