How do I stop the player from using a boat unless a condition is true?

I tried with an if, else, but I could only display text, not prevent them...
Have you considered a sideways approach and put an obstacle there which disappears when the condition is met?

Like a dock worker, or even a fence or rock would serve the purpose.

Could even have an invisible event that they can't walk through. That could do both display text for a clue what they need to do and serve as a blocking mechanism.

Hope that helps!
I tried with an if, else, but I could only display text, not prevent them...
If you want to know why something doesn't work, you would have to show us a screenshot of what you've done (the event commands).

That said there are many different ways to block access to a boat - for example having the boat not being there, but be an event that only replaces itself with the true boat if the condition is correct.
having the boat not being there, but be an event that only replaces itself with the true boat if the condition is correct.
That's the approach I would've taken off the top of my head.

However, I did a quick Google for "RPG Maker disable boat," and I found this plugin by @Shaz

It uses pretty basic functions, so it might work in MZ as it is - if not, you could probably ask Shaz for help adapting it, she's active on the forums.
MZ handles parameters differently to MV. That's probably why it won't work for you. You'd need it to be rewritten for the MZ parameter format.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-stop-the-player-from-using-a-boat-unless-a-condition-is-true.136945/