Health Display
Hi i need a plugin that display name and health with hudmessage! Like this. Can someone help me ?
formatex(sMessage, 63, "Friend: %s^nHealth: %i", sName, get_user_health(target)); } else { formatex(sMessage, 63, "Enemy: %s", sName); } |
Re: Health Display
set_hudmessage() // 20.1 Secs
show_hudmessage(id, sMessage) set_task(20.0, "FUNCTION-WHERE-DISPLAY-HUD", id) |
Re: Health Display
Napoleon, he means that if you aim at the person not random hud message :D
|
Re: Health Display
Code:
new p_target, p_bodyPart // p_target == target |
Re: Health Display
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); } |
Re: Health Display
Quote:
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. |
Re: Health Display
The rest of the code is lost and i don't remeber how i did to fix it..
|
Re: Health Display
PHP Code:
And what mod do you need this for? Everything i've played already prints those messages to your hud. |
Re: Health Display
You can use StatusText event - it is the default HUD text showing name and health when you aim at somebody.
|
Re: Health Display
Thanks really nice. But Im no good with scripting plugins so can someone maybe complete the plugin? Please:D
|
| All times are GMT -4. The time now is 07:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.