Actor Level-ups

For my game, I want there to be a pause in the middle where actors can no longer level up, but after a certain switch gets flipped they're allowed to level up again. So they should only be able to go up to level 10, but then once that switch is flipped they can resume leveling up, if that makes sense. Anyone know of a way to do that? If not, I can always find another idea, but I figured I'd ask first.
If you use Yanfly's Auto Passive States, you can set up a state with an EXP Rate trait of 0%, then have it trigger when you flip a switch. Turning the switch off would let the actor gain experience again.
Have an event check the level, then give every character a state that reduces exp gain to 0%.
(Ninja'd)
For my game, I want there to be a pause in the middle where actors can no longer level up...So they should only be able to go up to level 10
Well, which is it? Can they no longer level up at a certain point, or can they still level up to 10?

If you want them to not be able to level up at all, the above suggestions are good. If you want them to be able to get to 10 regardless of what level they are in this middle part, I've previously posted a snippet of code that will allow you to tie the max level to a variable.

You should be able to find it with a Google.
Pretty sure Mr. Trivel or @caethyril had an adjustable level cap plugin here and there. I know because I use one for my project.
Mr Trivel's plugin looks good:
(I did a quick search and found this old thread, but the plugin I posted there only allows mid-playthrough changes via states or class change, so it's of limited use. Doesn't refresh on state removal, either, which might cause problems.)
I used class level for restriction, but the bove or Mr.Trivel level cap
could be set to eval in the plugin and use the <Max Level: $gameVariables.value(ID)>
and use the game variable for levels or max level so they wont go over it,
if you increase that max variable, use the other variable to follow player levels.
Alright, I got it to work by setting a variable to equal the level of the actor, then checking to see if the variable equals 10, and then if it does, applying an invisible state that stops EXP gain.

Original thread: https://forums.rpgmakerweb.com/threads/actor-level-ups.162017/