Cstrike: Add cs_get_weapon_info() native
This commit is contained in:
@ -1062,6 +1062,17 @@ stock cs_get_weapon_class(weapon_id)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns some information about a weapon.
|
||||
*
|
||||
* @param weapon_id Weapon id, see CSW_* constants
|
||||
* @param type Info type, see CS_WEAPONINFO_* constants
|
||||
*
|
||||
* @return Weapon information value
|
||||
* @error If weapon_id and type are out of bound, an error will be thrown.
|
||||
*/
|
||||
native any:cs_get_weapon_info(weapon_id, CsWeaponInfo:type);
|
||||
|
||||
/**
|
||||
* Called when CS internally fires a command to a player.
|
||||
*
|
||||
|
@ -346,3 +346,13 @@ enum CsAmmoType
|
||||
CS_AMMO_57MM = 8,
|
||||
CS_AMMO_357SIG = 9,
|
||||
};
|
||||
|
||||
enum CsWeaponInfo
|
||||
{
|
||||
CS_WEAPONINFO_COST = 0,
|
||||
CS_WEAPONINFO_CLIP_COST = 1,
|
||||
CS_WEAPONINFO_BUY_CLIP_SIZE = 2,
|
||||
CS_WEAPONINFO_GUN_CLIP_SIZE = 3,
|
||||
CS_WEAPONINFO_MAX_ROUNDS = 4,
|
||||
CS_WEAPONINFO_AMMO_TYPE = 5,
|
||||
};
|
||||
|
Reference in New Issue
Block a user