New natives: cs_set_user_armor(), cs_get_user_armor()

cs_set_user_armor() should be used instead of fun's set_user_armor().
This commit is contained in:
Johnny Bergström
2005-01-16 16:30:18 +00:00
parent 5f7dabf9b6
commit 53188ab941
3 changed files with 67 additions and 0 deletions

View File

@ -176,6 +176,20 @@ native cs_get_user_driving(index);
*/
native cs_get_user_stationary(index);
/* Returns armor value and sets armor type in second parameter.
*/
enum CsArmorType {
CS_ARMOR_NONE = 0, // no armor
CS_ARMOR_KEVLAR = 1, // armor
CS_ARMOR_VESTHELM = 2 // armor and helmet
};
native cs_get_user_armor(index, CsArmorType:armortype);
/* 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);
/* Returns 1 if specified weapon is in burst mode.
*/
native cs_get_weapon_burst(index);