Quote:
Originally Posted by sila
Your plugin is like green line, can u make to be like red line at this screenshot .
http://i39.tinypic.com/2hcjihv.jpg
Also if i use amx_tsay or amx_csay hud health bar disappears until i lose some hp or new round start.
|
Code:
new gbr[101]
new health_percent
new gBar[ ] = "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII";
#define BAR_SIZE 2
#define BARFORMAT1 0, 255, 0, 0.04, 0.20, 0, 6.0, 999.9, 0.0, 0.0, 2
#define BARFORMAT2 0, 255, 0, 0.0402, 0.20, 0, 6.0, 999.9, 0.0, 0.0, 2
new gSyncMessageBAR1
new gSyncMessageBAR2
public plugin_init( )
{
gSyncMessageBAR1 = CreateHudSyncObj()
gSyncMessageBAR2 = CreateHudSyncObj()
}
your function should look like this:
Code:
health_percent = get_user_health(id)
formatex(gbr, 101, "%s",gBar[ min( 100, 100 - health_percent / BAR_SIZE ) ])
set_hudmessage(BARFORMAT1)
ShowSyncHudMsg(id,gSyncMessageBAR1,gbr)
set_hudmessage(BARFORMAT2)
ShowSyncHudMsg(id,gSyncMessageBAR2,gbr)