DC (
Source) has written
you actually can't get those values because the server isn't aware of the accurate ammo values.
the server only knows the maximum possible ammo amount a player still can have (based on the shoot-packets that arrived at the server) but the actual ammo value can differ (be slightly lower) in case a shoot-packet got lost. that's why these values are not revealed to the Lua scripting interface.
(in case a weapon is dropped the client determines the ammo which is in the dropped weapon. the server just checks if this value is lower or equal to the maximum possible ammo to make ammo hacks impossible)