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

[Req] Remove Radar And Add New HUD HP


Post New Thread Reply   
 
Thread Tools Display Modes
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-05-2012 , 07:56   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #11

I used dhudmessage, because the messages are bigger and look more realistic. Also, they don't have channels and can hardly be replaced by another hud messages.
__________________
<VeCo> is offline
TeddiBer
Senior Member
Join Date: Oct 2011
Old 06-07-2012 , 05:26   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #12

thanks <VeCo> !
i sorry that i replay only now, only because PC problems.
i will test it, and tell if there's any problem.

Edit: Very Better Than Before !
things to do:
1.there's still a delay on Hp change by damage.
sometimes it smooth, but sometimes it delay like 1sec.

2. no need for the color flashes at low number on the AP. Only good for HP.

3. the Blue color is hardly to see on light places. i can't think about other color except white.

Last edited by TeddiBer; 06-07-2012 at 05:50.
TeddiBer is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-07-2012 , 07:48   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #13

PHP Code:
#include <amxmodx>
#include <engine>
#include <dhudmessage>
 
new bool:g_b_user_hp_hud_blink[33]
 
public 
plugin_init() {
 
register_plugin("Real-Like HP/AP HUD""2.2""<VeCo>")
 
 new 
ent create_entity("info_target")
 
entity_set_string(ent,EV_SZ_classname,"env_hud")
 
entity_set_float(ent,EV_FL_nextthink,get_gametime() + 0.5)
 
 
register_think("env_hud","env_hud_think")
}
 
public 
env_hud_think(ent)
{
 
entity_set_float(ent,EV_FL_nextthink,get_gametime() + 0.5)
 
 static 
i_players[32],i_numi,ii
 get_players
(i_players,i_num,"a")
 
 static 
i_health,i_armor
 
 
for(i=0;i<i_num;i++)
 {
  
ii i_players[i]
 
  
i_health get_user_health(ii)
  
i_armor get_user_armor(ii)
 
  
set_dhudmessage(2552552550.010.9200.00.50.00.0)
  
show_dhudmessage(ii"HP:           AP:",get_user_health(ii))
 
  if(
i_health 30 || !g_b_user_hp_hud_blink[ii])
  {
   
g_b_user_hp_hud_blink[ii] = true
   set_dhudmessage
(25517000.010.9200.00.50.00.0)
  } else {
   if(
i_health <= 10g_b_user_hp_hud_blink[ii] = false
   set_dhudmessage
(255000.010.9200.00.50.00.0)
  }
  
show_dhudmessage(ii"     %i",i_health)
 
  if(
i_armor 30)
  {
   
set_dhudmessage(25517000.010.9200.00.50.00.0)
  } else {
   
set_dhudmessage(255000.010.9200.00.50.00.0)
  }
  
show_dhudmessage(ii"                     %i",i_armor)
 }

The HUD is updated on every 0.5 seconds, you can't change it directly when the damage is done. You can try to reduce that number, but the messages may start to disappear, because of preventing overflow.
__________________

Last edited by <VeCo>; 06-07-2012 at 07:48.
<VeCo> is offline
TeddiBer
Senior Member
Join Date: Oct 2011
Old 06-07-2012 , 08:37   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #14

Thanks You !
Works PERFECT.
you're Very Helpful
TeddiBer is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 06-07-2012 , 22:10   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #15

Works PERFECT.
I wellcome TeddiBer's suggestions and <VeCo>'s changes. Thank you!
I believe it's the best looking as can be. And delays in refreshing values would not be the problem.
__________________

Last edited by isotonic; 06-07-2012 at 22:13.
isotonic is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-23-2012 , 23:10   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #16

May be you make another version with StatusIcon digits? As in the plugin Anti Camper's Radar.
They really look pretty and don't disappearing.
__________________

Last edited by isotonic; 07-23-2012 at 23:11.
isotonic is offline
Capcaunul
Member
Join Date: Jan 2012
Old 07-24-2012 , 01:10   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #17

On this plugin , how i can remove the old HP & AP Shower ?
Capcaunul is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-24-2012 , 07:06   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #18

Quote:
Originally Posted by Capcaunul View Post
On this plugin , how i can remove the old HP & AP Shower ?
Use this: http://forums.alliedmods.net/showthread.php?p=680121
But it will hide the radar too.
__________________

Last edited by <VeCo>; 07-24-2012 at 07:06.
<VeCo> is offline
Capcaunul
Member
Join Date: Jan 2012
Old 07-24-2012 , 13:51   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #19

how can change colors from hp & ap ?
Capcaunul is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-24-2012 , 14:29   Re: [Req] Remove Radar And Add New HUD HP
Reply With Quote #20

Quote:
Originally Posted by Capcaunul View Post
how can change colors from hp & ap ?
The HP: and AP: texts are in one message:
PHP Code:
 set_dhudmessage(2552552550.010.9200.00.50.00.0)
show_dhudmessage(ii"HP: AP:",get_user_health(ii)) 
Change the first 3 numbers in set_dhudmessage to change the color (it's in RGB format).
__________________
<VeCo> is offline
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:01.


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