The lawmaker does not drink when he/she is under 18. In the first example, the lawmaker does obey the law.
In the second example, god makes the law not to kill, but still kills. The lawmaker does not obey the law, even though he should.
I grow weary of this argument getting in the way of my posts, so I'm going to put an end to it, now.
God created the universe in which there is the freedom of choice and in which the conscious choice of another to kill would have been foreseen. Thus, God accepts responsibility for all conscious choices to kill those who would obey the law.
God is not just the law maker - God is also the enforcer of those laws. Those who enforce the laws must be willing to contest those who would break the law on their terms. If someone has made the conscious decision to kill you while possessing the capability and the opportunity to do so - then the only thing that is going to stop that expression of free will is for another person to be willing to contest that person up to the point of claiming his or her life. That is simply the consequence of free will. Someone who has chosen to kill you can very easily choose to commit to killing those who would oppose him.
Thus, the provision is made for law enforcement officers to do what is necessary to enforce the law - including temporarily exceeding its constraints upon individual behavior. Officers can discharge their weapons in city limits in areas where that is prohibited (as can, in many places, people using them in self-defense). Officers are not held legally liable if, in the responsible application of the force necessary to stop a threat or violation of the law, cause injury or death to a person.
The notion that God is not moral because God has exceeded the constraints placed upon man (or advised man when those constraints can be exceeded) is simply nonsense.
If God worked in the way that the argument stipulates - the ability to resolve all conflicts peacefully and without loss of life - then the laws would not have much of a purpose in the first place.