Edit: In 1.70, optimization would be like this:
Code:
#define PLUGIN "ammoforhp"
#define VERSION "1.0"
#define AUTHOR "wouter"
//this is jsut to show where in the code you'd put this:
new g_AmmoCost
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /ammo", "cmd_ammo")
register_clcmd("say_team /ammo", "cmd_ammo")
register_cvar("amxx_ammoforhp", "1")
g_AmmoCost = get_pcvar_num("mp_ammocost")
}