This is the solution.
If the scripts work differently in single-player and multiplayer, then there exists a sequence of actions that will work differently in both. All you have to do is find it through trial and error.
Added 3 minutes ago
In my opinion, using a question box sounds good... The only thing is, it will probably be visible to all players... And there may be several of them in multiplayer.
Added 3 minutes ago
[/U]and also - maybe just create two maps - one for multiplayer and one for single-player? Copy and paste with changes to the necessary scripts and the map type.
Then, one will definitely work in single-player.
And as for its multiplayer copy, which can also be launched in single-player mode, you can simply add a check, and if all players except one are AI, then set it to "loose".
Then in multiplayer, you will definitely have to play against a player - it's multiplayer after all. And there won't even be any point in launching a multiplayer map in a mode without players.
And single-player... will remain single-player.
This is not needed for a map, but for a mod. Two versions will not solve the problem, because both can be launched in any way. And people like to play multiplayer maps through the single-player menu, because there you can see what the AI heroes are doing during their turn.