sending a packet automatically



Hey guys

i have a game which runs on an infinite loop as games do. During this loop
updates are made to player movement and so forth.

My problem is that i have a checkbox that when clicked automatically does
the next players move for them. However to do it manually you click a
abutton and on clicking it sends the command over the network to the server
and back.

when i do it automatically due to the loop it can send the packet say 6
times or more before being retrieved.

So my question is, how do you ensure that one paket is sent and no others
from that client until that packet returns? Or is the best way to have the
server ignore duplicate packets so they still get sent just nothing happens
from them.

Thanks


.