複製程式
#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)
試試看吧,我寫的小小測試過沒有問題@@
血量要一直監控才行!