Вот держи
Code
#include <amxmodx>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("***admins_hp+armor***", "0.1", "***volf***")
register_event("ResetHUD", "ResetHUD", "be")
}
public ResetHUD(id)
{
set_task(0.5, "admin_hp", id + 6910)
}
public admin_hp(TaskID)
{
new id = TaskID - 6910
if (is_user_admin(id))
{
set_user_armor(id, 111)
set_user_health(id, 211)
}
return PLUGIN_HANDLED
}
Можно и так:
Code
#include <amxmodx>
#include <amxmisc>
#include <fun>
#define ADMIN_FLAG ADMIN_RESERVATION
public plugin_init()
{
register_plugin("***admins-hp+armor***", "0.2", "***volf***")
register_event("ResetHUD", "ResetHUD", "be")
}
public ResetHUD(id)
{
set_task(0.5, "admin_hp", id + 6910)
}
public admin_hp(TaskID)
{
new id = TaskID - 6910
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
set_user_armor(id, 111)
set_user_health(id, 211)
}
return PLUGIN_HANDLED
}