First of all, make sure she is not hungry or in need of a nap. If it is her temper that is out of hand, there are several methods of training her. The key to proper training is consistency. Choose an option and the you MUST follow through every time:
1. Restrain her hands, and tell her that slapping is a 'No No'. Then redirect her play.
2. Firmly swat her legs, and tell her 'No Slap'. Hug her, and let her go back to playing. Repeat as needed, and praise her when she controls herself. (i.e. Stops herself before she slaps someone.)
3. Pick her up, remover her from the scene, and set her in time out. Let her know that slapping will not be tolerated. Make her sit for one minute before allowing her to return to her play.
Remember, no matter which method you choose, you must never discipline in anger!