复制程式
#include < amxmodx >
new Health[33]
public plugin_init()
register_plugin( "Show Player's Health", "1.0", "[TW]CheN" )
public client_putinserver(id)
set_task( 0.1, "ShowHudMsg", id, _, _, "b" )
public ShowHudMsg(id) {
Health[id] = get_user_health(id)
set_hudmessage( 255, 0, 0, 0.05, -1.0, 0, 6.0, 12.0 )
show_hudmessage( id, "你的血量是 %d", Health[id] )
}
public client_disconnect(id)
remove_task(id)
试试看吧,我写的小小测试过没有问题@@
血量要一直监控才行!