Raised This Month: $ Target: $400
 0% 

Health Display


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 04-24-2012 , 11:52   Re: Health Display
Reply With Quote #6

Quote:
Originally Posted by mattiiias93 View Post
Liverwiz yes you understand me if someone aim on a person it will display. I had a code but not the start code can someone fix it? Thanks

new target, body;
get_user_aiming(id, target, body, 9999);

if( 0 < target <= gMaxPlayers && is_user_alive(target))
{
new sName[32], sMessage[64];
get_user_name(target, sName, 31);

if( cs_get_user_team(target) == cs_get_user_team(id) )
{
formatex(sMessage, 63, "Friend: %s^nHealth: %i", sName, get_user_health(target));
} else {
formatex(sMessage, 63, "Enemy: %s", sName);
}

if(cs_get_user_team(target) == CS_TEAM_CT)
set_hudmessage()// HUDMESSAGE_COLOR
} else if(cs_get_user_team(target) == CS_TEAM_T){
set_hudmessage()// HUDMESSAGE_COLOR
}
show_hudmessage(id, "%s", sMessage);
}
Do you have the rest of the code? What is gMaxPlayers defined as? and does the code even compile? That first if statement, i'm not sure is a valid expression. What "start code" do you need? You mean headers and init function?

Also....when you're posting code into a thread make sure to wrap "[CODE" "[/CODE" or "[PHP" "[/PHP" tags around it to preserve whitespace. NOTE: PHP tags preserve syntax highlighting, if you want it to look fancy.
Liverwiz 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 07:47.


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