By command, you mean [ code ] and [ /code ] ...right?
The function hat I posted is custom, not from any common header. All you would need to do is change the counter IDs to whatever you are using, and call it before Waitdraw(). This is a personal style choice, but I hate to see raw instructions in global active scripts. It is far cleaner to encapsulate them all in functions.