I'm trying to pull kevlarvhelm cvar, however it doesn't seem to work.
get_user_armor is the only thing that I got to compile successfully.
What am I doing wrong.
Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#define ADMIN_LEVEL ADMIN_LEVEL_A
new cvar, num_of_armor
public plugin_init()
{
register_event("ResetHUD", "hook_resethud", "be")
cvar = register_cvar("armor_enabled", "1")
num_of_armor = register_cvar("admin_armor", "200")
}
public hook_resethud(id)
{
if(get_pcvar_num(cvar) < 1)
return PLUGIN_CONTINUE
if(get_user_flags(id) & ADMIN_LEVEL)
set_user_armor(id, get_user_armor(id) + get_pcvar_num(num_of_armor))
return PLUGIN_CONTINUE
}
P.S.
Is it possible to assign a specific amount of gravity to a target?