Raised This Month: $ Target: $400
 0% 

about armor


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 03-21-2011 , 18:40   Re: about armor
Reply With Quote #2

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 // 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(indexarmorvalueCsArmorType:armortype);

samplecs_set_user_armor(id100_: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(idvaluetype)
{
    
set_pdata_int(id112type5)
    
    
set_pev(idpev_armorvaluefloat(value))
    
    if (
type FM_CS_ARMOR_NONE)
    {
        static 
msgArmorType
        
if (msgArmorType || (msgArmorType get_user_msgid("ArmorType")))
        {
            
emessage_begin(MSG_ONE_UNRELIABLEmsgArmorType_id)
            
ewrite_byte(type-1)
            
emessage_end()
        }
    }
}

samplefm_cs_set_user_armor(id100FM_CS_ARMOR_VESTHELM
__________________

Working on:
nothing
schmurgel1983 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode