Grab V1.07 Beta 2, if you haven't already! That makes this script a cake-walk compared to doing it the old fashioned way.
Make a bar image for both your health and ammo as if they were at 100% and make sure it's designed so that if it's "squished", it won't look any different.
Now, keeping track of ammo and health are easy in Ply's Mod because you can use the Internal Variables for checking/using them. For quick reference the variable for health is $PH (player's current health). I'll show you how to do the Health bar and you can mold in your Ammo bar based on it.
Start off by loading up the HUD and putting it where you want. Now you will also want to declare a variable for doing small calculations (I always call mine "CalcVar"). Now, to make your bar scale itself, simply set your calculation variable to the player's current health, then divide by the maximum amount of health the player can have (default is 500), and then multiply by 100... You can simplify the divide/multiply if you want, but that's how it goes generically. Now just "scalehudx" your health bar by your calculation variable! (Use "scalehudy" for a vertical bar)
You can do this in 2 lines of script.
1 for making the HUD and declaring your variable, and 1 for constantly updating the health bar.
The one and only,
Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.