Jump to content
Sign in to follow this  
totopizza

[N-PLUGIN] Mostrar Vida y Armor por hud

Recommended Posts

Nombre del plugin: Show HUD Armor & Health

Author: acetatomil

Descripción: con este plugin podremos saber nuestra vida y armor mientras estamos vivos.

Imágenes: No hay...

Fuente: Show Armor & Health

Código:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Show HUD Armor & Health"
#define VERSION "1.0"
#define AUTHOR "acetatomil"

#define TASK_HUD 2100

new SyncHUD

public plugin_init() 
{
   register_plugin(PLUGIN, VERSION, AUTHOR)

   SyncHUD = CreateHudSyncObj()
}

public client_putinserver(id)
{
   set_task(1.0, "ShowHUD", id+TASK_HUD, _, _, "b")
}

public client_disconnect(id)
{
   remove_task(id+TASK_HUD)
}

public ShowHUD(taskid)
{
   new id = taskid-TASK_HUD

   if (!is_user_alive(id))
   {
       id = pev(id, pev_iuser2)
       if (!is_user_alive(id)) return;
   }
   set_hudmessage(0, 255, 0, 0.39, 0.8, 0, 6.0, 1.0)
   ShowSyncHudMsg(id, SyncHUD, "Heatlh: %d Armor: %d", get_user_health(id), get_user_armor(id))
} 

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...