eg:
PHP Code:
RegisterHam(Ham_Spawn, "player", "FwdHamPlayerSpawnPost", 1)
then use this code
PHP Code:
public FwdHamPlayerSpawnPost(id) {
if(!is_user_alive(id) && !is_user_human(id)) return HAM_IGNORED;
if(!(get_user_flags(id) & ADMIN_CHAT))
return PLUGIN_HANDLED;
if(pev(id, pev_armorvalue) < get_pcvar_num(human_armor))
set_pev(id, pev_armorvalue, float(get_pcvar_num(human_armor)))
return HAM_IGNORED;
}
there is a cvar human_armor so make a cvar variable like this
PHP Code:
new human_armor;
then register cvar by
Code:
human_armor = register_cvar("set_human_armor", "100");
NOTE: This code is didn't tested if u got any error so lemme know but this code should work without any error.
__________________