If you are planning to make a Pokemon game, I'd advise you head over to the Script board and give a look at the Pokemon Starter Kit thread, it may be more to your liking.
But to answer your question, you'd want to make a common event with a conditional branch that checks for the character in the party, if the character is in the party have it inflict the knockout effect (or make your own state in the database similar to the knockout effect). This will prevent him from being able to attack.
Here's a screenshot which may help if you're confused.
Good luck!