native cs_get_user_bpammo(index, weapon);
Returns amount of ammo in the client's backpack for a specific weapon.
-
For a list of possible weapon ids see the CSW_* constants in
amxconst.inc
-
Some weapons share ammo types and therefore ammo backpack pools. List
of ammo types:
ammo_338magnum - awp
ammo_762nato - scout, ak47, g3sg1
ammo_556natobox - m249
ammo_556nato - famas, m4a1, aug, sg550, galil, sg552
ammo_buckshot - m3, xm1014
ammo_45acp - usp, ump45, mac10
ammo_57mm - fiveseven, p90
ammo_50ae - deagle
ammo_357sig - p228
ammo_9mm - glock, mp5, tmp, elites
/ - hegrenade
/ - flashbang
/ - smokegrenade
- index — Client index
- weapon — Weapon id
Amount of ammo in backpack
-
If the client index is not within the range of 1 to
MaxClients, the client is not connected, or an invalid
weapon id is provided, an error will be thrown.