Replace map:set_pause_enabled() by game:set_pause_alowed().