ZP 5.0 Damage Left HP (Flags) Aug 3, 2023 23:53:08 GMT Quote Select PostDeselect PostLink to PostMemberGive GiftBack to Top Post by ProGarD on Aug 3, 2023 23:53:08 GMT Hello zppv.boardsso i tried to make this plugin only for who have slay access can see how much hp left of zombies if he damage them, i don't know what im doing wrong here so i just want a little hand for this=================Code===================================#include <amxmodx>#include <zombieplague>new g_hudmsg1public plugin_init() { register_plugin("Show HP + Armor", "1.0", "<VeCo>") register_event("Damage","event_damage", "b", "2!0", "3=0", "4!0") g_hudmsg1 = CreateHudSyncObj()}public event_damage(id){ new iAttac = get_user_attacker(id) if(iAttac == id || !is_user_alive(iAttac) || !is_user_alive(id)) return if(get_user_flags(id) & ADMIN_SLAY) { if(zp_get_user_zombie(id)) { set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 0.0, 0.2, 0.2, 3.0, -1 ); ShowSyncHudMsg(iAttac, g_hudmsg1, "%i", get_user_health(id)) } else { set_hudmessage(255, 0, 0, 0.50, 0.25, 0, 6.0, 1.0) ShowSyncHudMsg(iAttac, g_hudmsg1, "%i", get_user_health(id)) } }}
ZP 5.0 Damage Left HP (Flags) Aug 25, 2023 12:42:43 GMT Quote Select PostDeselect PostLink to PostMemberGive GiftBack to Top Post by tote on Aug 25, 2023 12:42:43 GMT You were getting flags of the player not the person who is hitting to the enemy, iAttack = the person who will be shown the hp dmg hud[php]#include <amxmodx>#include <zombieplague>new g_hudmsg1public plugin_init() { register_plugin("Show HP + Armor", "1.0", "<VeCo>") register_event("Damage","event_damage", "b", "2!0", "3=0", "4!0") g_hudmsg1 = CreateHudSyncObj()}public event_damage(id){ new iAttac = get_user_attacker(id) if(iAttac == id || !is_user_alive(iAttac) || !is_user_alive(id)) return if(get_user_flags(iAttac) & ADMIN_SLAY) { if(zp_get_user_zombie(id)) { set_hudmessage(255, 0, 0, -1.0, 0.25, 0, 0.0, 0.2, 0.2, 3.0, -1 ); ShowSyncHudMsg(iAttac, g_hudmsg1, "%i", get_user_health(id)) } else { set_hudmessage(255, 0, 0, 0.50, 0.25, 0, 6.0, 1.0) ShowSyncHudMsg(iAttac, g_hudmsg1, "%i", get_user_health(id)) } }}[/php]