Raised This Month: $ Target: $400
 0% 

Show enemy HP with hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrDeNNiS26
Junior Member
Join Date: Jan 2010
Old 11-02-2010 , 11:09   Show enemy HP with hud
Reply With Quote #1



Like this, but i want to

Code:
Player Name | Healt: 100
Thanks.
MrDeNNiS26 is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-02-2010 , 17:13   Re: Show enemy HP with hud
Reply With Quote #2

Show us the code.
bibu is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 11-03-2010 , 00:33   Re: Show enemy HP with hud
Reply With Quote #3

Quote:
Originally Posted by MrDeNNiS26 View Post


Like this, but i want to

Code:
Player Name | Healt: 100
Thanks.
you mean to aim at a plarer,then show his health?
if so,you can separate the code from miscstats.
Jacob is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 11-03-2010 , 18:40   Re: Show enemy HP with hud
Reply With Quote #4

Try this:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define IsPlayer(%1) (1 <= %1 <= g_players)

new const PLUGIN_VERSION[]  = "1.0";
new 
gRedgBlue;
new 
g_players;

public 
plugin_init() 
{
 
register_plugin("Aim Health"PLUGIN_VERSION,  "MaNiax");
 
RegisterHam(Ham_Player_PreThink"player""Player_PreThink");
 
g_players get_maxplayers();
}

public 
Player_PreThink(id)
{
 new 
iPlriBody;
 
get_user_aiming(idiPlriBody);
 
 if( 
IsPlayer(iPlr) && is_user_alive(iPlr) )
 {
  switch( 
cs_get_user_team(iPlr) )
  {
   case 
CS_TEAM_T:
   {
    
gRed 255;
    
gBlue 0;
   }
   case 
CS_TEAM_CT:
   {
    
gRed 0;
    
gBlue 255;
   }
  }
  
  new 
EnemyHealth get_user_health(iPlr);
  new 
EnemyName[33];
  
get_user_name(iPlrEnemyNamecharsmax(EnemyName));
  
set_hudmessage(gRedgBlue0, -1.0, -1.006.01.60.10.2, -1); 
  
show_hudmessage(id"Name: %s | Health: %i"EnemyNameEnemyHealth);
 }  


Last edited by nnajko; 02-19-2011 at 23:34.
nnajko is offline
dangername
Junior Member
Join Date: Oct 2010
Old 11-05-2010 , 22:57   Re: Show enemy HP with hud
Reply With Quote #5

Quote:
Originally Posted by nnajko View Post
Try this:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#define IsPlayer(%1) (1 <= %1 <= g_players)
new const PLUGIN_VERSION[]  = "1.0";
new 
gRedgBlue;
new 
g_players;
public 
plugin_init() 
{
 
register_plugin("Aim Health"PLUGIN_VERSION,  "MaNiax");
 
RegisterHam(Ham_Player_PreThink"player""Player_PreThink");
 
g_players get_maxplayers();
}
public 
Player_PreThink(id)
{
 new 
iPlriBody;
 
get_user_aiming(idiPlriBody);
 
 if( 
IsPlayer(iPlr) && is_user_alive(iPlr) )
 {
  switch( 
cs_get_user_team(iPlr) )
  {
   case 
CS_TEAM_T:
   {
    
gRed 255;
    
gBlue 0;
   }
   case 
CS_TEAM_CT:
   {
    
gRed 0;
    
gBlue 255;
   }
  }
  
  new 
EnemyHealth get_user_health(iPlr);
  new 
EnemyName[33];
  
get_user_name(iPlrEnemyNamecharsmax(EnemyName));
  
set_hudmessage(gRedgBlue0, -1.0, -1.006.01.60.10.2, -1); 
  
show_hudmessage(id"Name: %s | Health: %i"EnemyNameEnemyHealth);
 }  

Can you do exactly like this , but the message on the center of the screen ?
dangername is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-05-2010 , 23:31   Re: Show enemy HP with hud
Reply With Quote #6

Quote:
Originally Posted by dangername View Post
Can you do exactly like this , but the message on the center of the screen ?
It already does that.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
frwl
Junior Member
Join Date: Sep 2015
Old 06-20-2017 , 08:37   Re: Show enemy HP with hud
Reply With Quote #7

Spoiler


Could someone please add #define for admin access only?
frwl is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-20-2017 , 10:05   Re: Show enemy HP with hud
Reply With Quote #8

Nice bumbing thread 7 years old
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
HoussamBenmouna
Member
Join Date: Jun 2017
Location: Morocco
Old 06-20-2017 , 19:29   Re: Show enemy HP with hud
Reply With Quote #9

Haha
__________________
Working on Hulk's Mode (10%)
HoussamBenmouna 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 10:40.


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