Replace map:set_pause_enabled() by game:set_pause_allowed() in scripts.