The sma are the scripts. Ok, looks like you are very new to this because otherwise you would have figured it out by now. Anyway, in this case I friendly point you to the following thread:
http://forums.alliedmods.net/showthread.php?t=30191
Tell you what, the regenerating routine is in the tutorial as well. You only need to read it, do some copy/paste and voilĂ*, there you go. And remember, the path to your first hero is full of sticks and stones. But the harder the way, the more you learn.