about your armor => engine => armor is simple
because u set only the armorvalue but the engine don't know the player as a real armor.
<cstrike>
PHP Code:
enum CsArmorType {
CS_ARMOR_NONE = 0, // no armor
CS_ARMOR_KEVLAR = 1, // armor
CS_ARMOR_VESTHELM = 2 // armor and helmet
};
/* Use this instead of fun's set_user_armor.
* Appropriate message to update client's HUD will be sent if armortype is kevlar or vesthelm.
*/
native cs_set_user_armor(index, armorvalue, CsArmorType:armortype);
sample: cs_set_user_armor(id, 100, _:CS_ARMOR_VESTHELM)
<fakemeta>
PHP Code:
enum
{
FM_CS_ARMOR_NONE = 0, // no armor
FM_CS_ARMOR_KEVLAR, // armor
FM_CS_ARMOR_VESTHELM // armor and helmet
}
stock fm_cs_set_user_armor(id, value, type)
{
set_pdata_int(id, 112, type, 5)
set_pev(id, pev_armorvalue, float(value))
if (type > FM_CS_ARMOR_NONE)
{
static msgArmorType
if (msgArmorType || (msgArmorType = get_user_msgid("ArmorType")))
{
emessage_begin(MSG_ONE_UNRELIABLE, msgArmorType, _, id)
ewrite_byte(type-1)
emessage_end()
}
}
}
sample: fm_cs_set_user_armor(id, 100, FM_CS_ARMOR_VESTHELM)
__________________