check this !
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
new g_HudSyncObj
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message(get_user_msgid("StatusValue") , "msg_StatusValue")
g_HudSyncObj = CreateHudSyncObj();
}
public msg_StatusValue(iMsgID, iDest, iClient)
{
static value, status[2]
value = get_msg_arg_int(2)
if(value && get_msg_arg_int(1) == 1)
{
status[0] = iClient
status[1] = value
show_status(status)
}
return PLUGIN_HANDLED
}
public show_status(status[])
{
new id
new body
new name[32]
get_user_name(status[1], name, 31)
get_user_aiming(status[0], id, body)
if(id != status[1])
return
set_hudmessage(_, _, _, -1.0, 0.55, 0, 0.0, 0.8, 0.1, 0.5, -1)
ShowSyncHudMsg(status[0], g_HudSyncObj, "%s", name)
set_task(1.5 , "show_status" , status[0] + 4090 , status , 3)
}
__________________