Raised This Month: $ Target: $400
 0% 

Show enemy HP with hud


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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